All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.shield.model.UpdateProtectionGroupRequest Maven / Gradle / Ivy

/*
 * Copyright 2019-2024 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.AmazonWebServiceRequest;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateProtectionGroupRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The name of the protection group. You use this to identify the protection group in lists and to manage the * protection group, for example to update, delete, or describe it. *

*/ private String protectionGroupId; /** *

* Defines how Shield combines resource data for the group in order to detect, mitigate, and report events. *

*
    *
  • *

    * Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP * addresses for EC2 instances that scale manually or automatically. *

    *
  • *
  • *

    * Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic * uniformly. Examples include accelerators and load balancers. *

    *
  • *
  • *

    * Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for * resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and * origin resources for CloudFront distributions. *

    *
  • *
*/ private String aggregation; /** *

* The criteria to use to choose the protected resources for inclusion in the group. You can include all resources * that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a * specified resource type. *

*/ private String pattern; /** *

* The resource type to include in the protection group. All protected resources of this type are included in the * protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you * must not set it for any other Pattern setting. *

*/ private String resourceType; /** *

* The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you * set Pattern to ARBITRARY and you must not set it for any other Pattern * setting. *

*/ private java.util.List members; /** *

* The name of the protection group. You use this to identify the protection group in lists and to manage the * protection group, for example to update, delete, or describe it. *

* * @param protectionGroupId * The name of the protection group. You use this to identify the protection group in lists and to manage the * protection group, for example to update, delete, or describe it. */ public void setProtectionGroupId(String protectionGroupId) { this.protectionGroupId = protectionGroupId; } /** *

* The name of the protection group. You use this to identify the protection group in lists and to manage the * protection group, for example to update, delete, or describe it. *

* * @return The name of the protection group. You use this to identify the protection group in lists and to manage * the protection group, for example to update, delete, or describe it. */ public String getProtectionGroupId() { return this.protectionGroupId; } /** *

* The name of the protection group. You use this to identify the protection group in lists and to manage the * protection group, for example to update, delete, or describe it. *

* * @param protectionGroupId * The name of the protection group. You use this to identify the protection group in lists and to manage the * protection group, for example to update, delete, or describe it. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateProtectionGroupRequest withProtectionGroupId(String protectionGroupId) { setProtectionGroupId(protectionGroupId); return this; } /** *

* Defines how Shield combines resource data for the group in order to detect, mitigate, and report events. *

*
    *
  • *

    * Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP * addresses for EC2 instances that scale manually or automatically. *

    *
  • *
  • *

    * Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic * uniformly. Examples include accelerators and load balancers. *

    *
  • *
  • *

    * Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for * resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and * origin resources for CloudFront distributions. *

    *
  • *
* * @param aggregation * Defines how Shield combines resource data for the group in order to detect, mitigate, and report * events.

*
    *
  • *

    * Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include * Elastic IP addresses for EC2 instances that scale manually or automatically. *

    *
  • *
  • *

    * Mean - Use the average of the traffic across the group. This is a good choice for resources that share * traffic uniformly. Examples include accelerators and load balancers. *

    *
  • *
  • *

    * Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic * and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront * distributions and origin resources for CloudFront distributions. *

    *
  • * @see ProtectionGroupAggregation */ public void setAggregation(String aggregation) { this.aggregation = aggregation; } /** *

    * Defines how Shield combines resource data for the group in order to detect, mitigate, and report events. *

    *
      *
    • *

      * Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP * addresses for EC2 instances that scale manually or automatically. *

      *
    • *
    • *

      * Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic * uniformly. Examples include accelerators and load balancers. *

      *
    • *
    • *

      * Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for * resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and * origin resources for CloudFront distributions. *

      *
    • *
    * * @return Defines how Shield combines resource data for the group in order to detect, mitigate, and report * events.

    *
      *
    • *

      * Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include * Elastic IP addresses for EC2 instances that scale manually or automatically. *

      *
    • *
    • *

      * Mean - Use the average of the traffic across the group. This is a good choice for resources that share * traffic uniformly. Examples include accelerators and load balancers. *

      *
    • *
    • *

      * Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic * and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront * distributions and origin resources for CloudFront distributions. *

      *
    • * @see ProtectionGroupAggregation */ public String getAggregation() { return this.aggregation; } /** *

      * Defines how Shield combines resource data for the group in order to detect, mitigate, and report events. *

      *
        *
      • *

        * Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP * addresses for EC2 instances that scale manually or automatically. *

        *
      • *
      • *

        * Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic * uniformly. Examples include accelerators and load balancers. *

        *
      • *
      • *

        * Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for * resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and * origin resources for CloudFront distributions. *

        *
      • *
      * * @param aggregation * Defines how Shield combines resource data for the group in order to detect, mitigate, and report * events.

      *
        *
      • *

        * Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include * Elastic IP addresses for EC2 instances that scale manually or automatically. *

        *
      • *
      • *

        * Mean - Use the average of the traffic across the group. This is a good choice for resources that share * traffic uniformly. Examples include accelerators and load balancers. *

        *
      • *
      • *

        * Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic * and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront * distributions and origin resources for CloudFront distributions. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see ProtectionGroupAggregation */ public UpdateProtectionGroupRequest withAggregation(String aggregation) { setAggregation(aggregation); return this; } /** *

        * Defines how Shield combines resource data for the group in order to detect, mitigate, and report events. *

        *
          *
        • *

          * Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP * addresses for EC2 instances that scale manually or automatically. *

          *
        • *
        • *

          * Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic * uniformly. Examples include accelerators and load balancers. *

          *
        • *
        • *

          * Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for * resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and * origin resources for CloudFront distributions. *

          *
        • *
        * * @param aggregation * Defines how Shield combines resource data for the group in order to detect, mitigate, and report * events.

        *
          *
        • *

          * Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include * Elastic IP addresses for EC2 instances that scale manually or automatically. *

          *
        • *
        • *

          * Mean - Use the average of the traffic across the group. This is a good choice for resources that share * traffic uniformly. Examples include accelerators and load balancers. *

          *
        • *
        • *

          * Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic * and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront * distributions and origin resources for CloudFront distributions. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see ProtectionGroupAggregation */ public UpdateProtectionGroupRequest withAggregation(ProtectionGroupAggregation aggregation) { this.aggregation = aggregation.toString(); return this; } /** *

          * The criteria to use to choose the protected resources for inclusion in the group. You can include all resources * that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a * specified resource type. *

          * * @param pattern * The criteria to use to choose the protected resources for inclusion in the group. You can include all * resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all * resources of a specified resource type. * @see ProtectionGroupPattern */ public void setPattern(String pattern) { this.pattern = pattern; } /** *

          * The criteria to use to choose the protected resources for inclusion in the group. You can include all resources * that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a * specified resource type. *

          * * @return The criteria to use to choose the protected resources for inclusion in the group. You can include all * resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all * resources of a specified resource type. * @see ProtectionGroupPattern */ public String getPattern() { return this.pattern; } /** *

          * The criteria to use to choose the protected resources for inclusion in the group. You can include all resources * that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a * specified resource type. *

          * * @param pattern * The criteria to use to choose the protected resources for inclusion in the group. You can include all * resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all * resources of a specified resource type. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtectionGroupPattern */ public UpdateProtectionGroupRequest withPattern(String pattern) { setPattern(pattern); return this; } /** *

          * The criteria to use to choose the protected resources for inclusion in the group. You can include all resources * that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a * specified resource type. *

          * * @param pattern * The criteria to use to choose the protected resources for inclusion in the group. You can include all * resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all * resources of a specified resource type. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtectionGroupPattern */ public UpdateProtectionGroupRequest withPattern(ProtectionGroupPattern pattern) { this.pattern = pattern.toString(); return this; } /** *

          * The resource type to include in the protection group. All protected resources of this type are included in the * protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you * must not set it for any other Pattern setting. *

          * * @param resourceType * The resource type to include in the protection group. All protected resources of this type are included in * the protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE * and you must not set it for any other Pattern setting. * @see ProtectedResourceType */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** *

          * The resource type to include in the protection group. All protected resources of this type are included in the * protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you * must not set it for any other Pattern setting. *

          * * @return The resource type to include in the protection group. All protected resources of this type are included * in the protection group. You must set this when you set Pattern to * BY_RESOURCE_TYPE and you must not set it for any other Pattern setting. * @see ProtectedResourceType */ public String getResourceType() { return this.resourceType; } /** *

          * The resource type to include in the protection group. All protected resources of this type are included in the * protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you * must not set it for any other Pattern setting. *

          * * @param resourceType * The resource type to include in the protection group. All protected resources of this type are included in * the protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE * and you must not set it for any other Pattern setting. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtectedResourceType */ public UpdateProtectionGroupRequest withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** *

          * The resource type to include in the protection group. All protected resources of this type are included in the * protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you * must not set it for any other Pattern setting. *

          * * @param resourceType * The resource type to include in the protection group. All protected resources of this type are included in * the protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE * and you must not set it for any other Pattern setting. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtectedResourceType */ public UpdateProtectionGroupRequest withResourceType(ProtectedResourceType resourceType) { this.resourceType = resourceType.toString(); return this; } /** *

          * The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you * set Pattern to ARBITRARY and you must not set it for any other Pattern * setting. *

          * * @return The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this * when you set Pattern to ARBITRARY and you must not set it for any other * Pattern setting. */ public java.util.List getMembers() { return members; } /** *

          * The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you * set Pattern to ARBITRARY and you must not set it for any other Pattern * setting. *

          * * @param members * The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this * when you set Pattern to ARBITRARY and you must not set it for any other * Pattern setting. */ public void setMembers(java.util.Collection members) { if (members == null) { this.members = null; return; } this.members = new java.util.ArrayList(members); } /** *

          * The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you * set Pattern to ARBITRARY and you must not set it for any other Pattern * setting. *

          *

          * NOTE: This method appends the values to the existing list (if any). Use * {@link #setMembers(java.util.Collection)} or {@link #withMembers(java.util.Collection)} if you want to override * the existing values. *

          * * @param members * The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this * when you set Pattern to ARBITRARY and you must not set it for any other * Pattern setting. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateProtectionGroupRequest withMembers(String... members) { if (this.members == null) { setMembers(new java.util.ArrayList(members.length)); } for (String ele : members) { this.members.add(ele); } return this; } /** *

          * The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you * set Pattern to ARBITRARY and you must not set it for any other Pattern * setting. *

          * * @param members * The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this * when you set Pattern to ARBITRARY and you must not set it for any other * Pattern setting. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateProtectionGroupRequest withMembers(java.util.Collection members) { setMembers(members); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getProtectionGroupId() != null) sb.append("ProtectionGroupId: ").append(getProtectionGroupId()).append(","); if (getAggregation() != null) sb.append("Aggregation: ").append(getAggregation()).append(","); if (getPattern() != null) sb.append("Pattern: ").append(getPattern()).append(","); if (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getMembers() != null) sb.append("Members: ").append(getMembers()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateProtectionGroupRequest == false) return false; UpdateProtectionGroupRequest other = (UpdateProtectionGroupRequest) obj; if (other.getProtectionGroupId() == null ^ this.getProtectionGroupId() == null) return false; if (other.getProtectionGroupId() != null && other.getProtectionGroupId().equals(this.getProtectionGroupId()) == false) return false; if (other.getAggregation() == null ^ this.getAggregation() == null) return false; if (other.getAggregation() != null && other.getAggregation().equals(this.getAggregation()) == false) return false; if (other.getPattern() == null ^ this.getPattern() == null) return false; if (other.getPattern() != null && other.getPattern().equals(this.getPattern()) == false) return false; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getMembers() == null ^ this.getMembers() == null) return false; if (other.getMembers() != null && other.getMembers().equals(this.getMembers()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProtectionGroupId() == null) ? 0 : getProtectionGroupId().hashCode()); hashCode = prime * hashCode + ((getAggregation() == null) ? 0 : getAggregation().hashCode()); hashCode = prime * hashCode + ((getPattern() == null) ? 0 : getPattern().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getMembers() == null) ? 0 : getMembers().hashCode()); return hashCode; } @Override public UpdateProtectionGroupRequest clone() { return (UpdateProtectionGroupRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy