/* * 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.redshift.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes a security group. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ClusterSecurityGroup implements Serializable, Cloneable { /** ** The name of the cluster security group to which the operation was applied. *
*/ private String clusterSecurityGroupName; /** ** A description of the security group. *
*/ private String description; /** ** A list of EC2 security groups that are permitted to access clusters associated with this cluster security group. *
*/ private com.amazonaws.internal.SdkInternalList* A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security * group. *
*/ private com.amazonaws.internal.SdkInternalList* The list of tags for the cluster security group. *
*/ private com.amazonaws.internal.SdkInternalList* The name of the cluster security group to which the operation was applied. *
* * @param clusterSecurityGroupName * The name of the cluster security group to which the operation was applied. */ public void setClusterSecurityGroupName(String clusterSecurityGroupName) { this.clusterSecurityGroupName = clusterSecurityGroupName; } /** ** The name of the cluster security group to which the operation was applied. *
* * @return The name of the cluster security group to which the operation was applied. */ public String getClusterSecurityGroupName() { return this.clusterSecurityGroupName; } /** ** The name of the cluster security group to which the operation was applied. *
* * @param clusterSecurityGroupName * The name of the cluster security group to which the operation was applied. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSecurityGroup withClusterSecurityGroupName(String clusterSecurityGroupName) { setClusterSecurityGroupName(clusterSecurityGroupName); return this; } /** ** A description of the security group. *
* * @param description * A description of the security group. */ public void setDescription(String description) { this.description = description; } /** ** A description of the security group. *
* * @return A description of the security group. */ public String getDescription() { return this.description; } /** ** A description of the security group. *
* * @param description * A description of the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSecurityGroup withDescription(String description) { setDescription(description); return this; } /** ** A list of EC2 security groups that are permitted to access clusters associated with this cluster security group. *
* * @return A list of EC2 security groups that are permitted to access clusters associated with this cluster security * group. */ public java.util.List* A list of EC2 security groups that are permitted to access clusters associated with this cluster security group. *
* * @param eC2SecurityGroups * A list of EC2 security groups that are permitted to access clusters associated with this cluster security * group. */ public void setEC2SecurityGroups(java.util.Collection* A list of EC2 security groups that are permitted to access clusters associated with this cluster security group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setEC2SecurityGroups(java.util.Collection)} or {@link #withEC2SecurityGroups(java.util.Collection)} if * you want to override the existing values. *
* * @param eC2SecurityGroups * A list of EC2 security groups that are permitted to access clusters associated with this cluster security * group. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSecurityGroup withEC2SecurityGroups(EC2SecurityGroup... eC2SecurityGroups) { if (this.eC2SecurityGroups == null) { setEC2SecurityGroups(new com.amazonaws.internal.SdkInternalList* A list of EC2 security groups that are permitted to access clusters associated with this cluster security group. *
* * @param eC2SecurityGroups * A list of EC2 security groups that are permitted to access clusters associated with this cluster security * group. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSecurityGroup withEC2SecurityGroups(java.util.Collection* A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security * group. *
* * @return A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster * security group. */ public java.util.List* A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security * group. *
* * @param iPRanges * A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster * security group. */ public void setIPRanges(java.util.Collection* A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security * group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setIPRanges(java.util.Collection)} or {@link #withIPRanges(java.util.Collection)} if you want to override * the existing values. *
* * @param iPRanges * A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster * security group. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSecurityGroup withIPRanges(IPRange... iPRanges) { if (this.iPRanges == null) { setIPRanges(new com.amazonaws.internal.SdkInternalList* A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security * group. *
* * @param iPRanges * A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster * security group. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSecurityGroup withIPRanges(java.util.Collection* The list of tags for the cluster security group. *
* * @return The list of tags for the cluster security group. */ public java.util.List* The list of tags for the cluster security group. *
* * @param tags * The list of tags for the cluster security group. */ public void setTags(java.util.Collection* The list of tags for the cluster security group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * The list of tags for the cluster security group. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSecurityGroup withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* The list of tags for the cluster security group. *
* * @param tags * The list of tags for the cluster security group. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSecurityGroup withTags(java.util.Collection