/* * 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; /** *
* The attack information for the specified SubResource. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SubResourceSummary implements Serializable, Cloneable, StructuredPojo { /** *
* The SubResource
type.
*
* The unique identifier (ID) of the SubResource
.
*
* The list of attack types and associated counters. *
*/ private java.util.List* The counters that describe the details of the attack. *
*/ private java.util.List
* The SubResource
type.
*
SubResource
type.
* @see SubResourceType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The SubResource
type.
*
SubResource
type.
* @see SubResourceType
*/
public String getType() {
return this.type;
}
/**
*
* The SubResource
type.
*
SubResource
type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see SubResourceType
*/
public SubResourceSummary withType(String type) {
setType(type);
return this;
}
/**
*
* The SubResource
type.
*
SubResource
type.
* @see SubResourceType
*/
public void setType(SubResourceType type) {
withType(type);
}
/**
*
* The SubResource
type.
*
SubResource
type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see SubResourceType
*/
public SubResourceSummary withType(SubResourceType type) {
this.type = type.toString();
return this;
}
/**
*
* The unique identifier (ID) of the SubResource
.
*
SubResource
.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The unique identifier (ID) of the SubResource
.
*
SubResource
.
*/
public String getId() {
return this.id;
}
/**
*
* The unique identifier (ID) of the SubResource
.
*
SubResource
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubResourceSummary withId(String id) {
setId(id);
return this;
}
/**
* * The list of attack types and associated counters. *
* * @return The list of attack types and associated counters. */ public java.util.List* The list of attack types and associated counters. *
* * @param attackVectors * The list of attack types and associated counters. */ public void setAttackVectors(java.util.Collection* The list of attack types and associated counters. *
** 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 attack types and associated counters. * @return Returns a reference to this object so that method calls can be chained together. */ public SubResourceSummary withAttackVectors(SummarizedAttackVector... attackVectors) { if (this.attackVectors == null) { setAttackVectors(new java.util.ArrayList* The list of attack types and associated counters. *
* * @param attackVectors * The list of attack types and associated counters. * @return Returns a reference to this object so that method calls can be chained together. */ public SubResourceSummary withAttackVectors(java.util.Collection* The counters that describe the details of the attack. *
* * @return The counters that describe the details of the attack. */ public java.util.List* The counters that describe the details of the attack. *
* * @param counters * The counters that describe the details of the attack. */ public void setCounters(java.util.Collection* The counters that describe the details of the attack. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setCounters(java.util.Collection)} or {@link #withCounters(java.util.Collection)} if you want to override * the existing values. *
* * @param counters * The counters that describe the details of the attack. * @return Returns a reference to this object so that method calls can be chained together. */ public SubResourceSummary withCounters(SummarizedCounter... counters) { if (this.counters == null) { setCounters(new java.util.ArrayList* The counters that describe the details of the attack. *
* * @param counters * The counters that describe the details of the attack. * @return Returns a reference to this object so that method calls can be chained together. */ public SubResourceSummary withCounters(java.util.Collection