/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.shield.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Summarizes all DDoS attacks for a specified time period. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AttackSummary implements Serializable, Cloneable, StructuredPojo { /** ** The unique identifier (ID) of the attack. *
*/ private String attackId; /** ** The ARN (Amazon Resource Name) of the resource that was attacked. *
*/ private String resourceArn; /** ** The start time of the attack, in Unix time in seconds. *
*/ private java.util.Date startTime; /** ** The end time of the attack, in Unix time in seconds. *
*/ private java.util.Date endTime; /** ** The list of attacks for a specified time period. *
*/ private java.util.List* The unique identifier (ID) of the attack. *
* * @param attackId * The unique identifier (ID) of the attack. */ public void setAttackId(String attackId) { this.attackId = attackId; } /** ** The unique identifier (ID) of the attack. *
* * @return The unique identifier (ID) of the attack. */ public String getAttackId() { return this.attackId; } /** ** The unique identifier (ID) of the attack. *
* * @param attackId * The unique identifier (ID) of the attack. * @return Returns a reference to this object so that method calls can be chained together. */ public AttackSummary withAttackId(String attackId) { setAttackId(attackId); return this; } /** ** The ARN (Amazon Resource Name) of the resource that was attacked. *
* * @param resourceArn * The ARN (Amazon Resource Name) of the resource that was attacked. */ public void setResourceArn(String resourceArn) { this.resourceArn = resourceArn; } /** ** The ARN (Amazon Resource Name) of the resource that was attacked. *
* * @return The ARN (Amazon Resource Name) of the resource that was attacked. */ public String getResourceArn() { return this.resourceArn; } /** ** The ARN (Amazon Resource Name) of the resource that was attacked. *
* * @param resourceArn * The ARN (Amazon Resource Name) of the resource that was attacked. * @return Returns a reference to this object so that method calls can be chained together. */ public AttackSummary withResourceArn(String resourceArn) { setResourceArn(resourceArn); return this; } /** ** The start time of the attack, in Unix time in seconds. *
* * @param startTime * The start time of the attack, in Unix time in seconds. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** ** The start time of the attack, in Unix time in seconds. *
* * @return The start time of the attack, in Unix time in seconds. */ public java.util.Date getStartTime() { return this.startTime; } /** ** The start time of the attack, in Unix time in seconds. *
* * @param startTime * The start time of the attack, in Unix time in seconds. * @return Returns a reference to this object so that method calls can be chained together. */ public AttackSummary withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** ** The end time of the attack, in Unix time in seconds. *
* * @param endTime * The end time of the attack, in Unix time in seconds. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** ** The end time of the attack, in Unix time in seconds. *
* * @return The end time of the attack, in Unix time in seconds. */ public java.util.Date getEndTime() { return this.endTime; } /** ** The end time of the attack, in Unix time in seconds. *
* * @param endTime * The end time of the attack, in Unix time in seconds. * @return Returns a reference to this object so that method calls can be chained together. */ public AttackSummary withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** ** The list of attacks for a specified time period. *
* * @return The list of attacks for a specified time period. */ public java.util.List* The list of attacks for a specified time period. *
* * @param attackVectors * The list of attacks for a specified time period. */ public void setAttackVectors(java.util.Collection* The list of attacks for a specified time period. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAttackVectors(java.util.Collection)} or {@link #withAttackVectors(java.util.Collection)} if you want * to override the existing values. *
* * @param attackVectors * The list of attacks for a specified time period. * @return Returns a reference to this object so that method calls can be chained together. */ public AttackSummary withAttackVectors(AttackVectorDescription... attackVectors) { if (this.attackVectors == null) { setAttackVectors(new java.util.ArrayList* The list of attacks for a specified time period. *
* * @param attackVectors * The list of attacks for a specified time period. * @return Returns a reference to this object so that method calls can be chained together. */ public AttackSummary withAttackVectors(java.util.Collection