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

com.amazonaws.services.redshift.model.ClusterSubnetGroup Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Redshift module holds the client classes that are used for communicating with Amazon Redshift Service

The newest version!
/*
 * 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.redshift.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Describes a subnet group. *

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

* The name of the cluster subnet group. *

*/ private String clusterSubnetGroupName; /** *

* The description of the cluster subnet group. *

*/ private String description; /** *

* The VPC ID of the cluster subnet group. *

*/ private String vpcId; /** *

* The status of the cluster subnet group. Possible values are Complete, Incomplete and * Invalid. *

*/ private String subnetGroupStatus; /** *

* A list of the VPC Subnet elements. *

*/ private com.amazonaws.internal.SdkInternalList subnets; /** *

* The list of tags for the cluster subnet group. *

*/ private com.amazonaws.internal.SdkInternalList tags; /** *

* The IP address types supported by this cluster subnet group. Possible values are ipv4 and * dualstack. *

*/ private com.amazonaws.internal.SdkInternalList supportedClusterIpAddressTypes; /** *

* The name of the cluster subnet group. *

* * @param clusterSubnetGroupName * The name of the cluster subnet group. */ public void setClusterSubnetGroupName(String clusterSubnetGroupName) { this.clusterSubnetGroupName = clusterSubnetGroupName; } /** *

* The name of the cluster subnet group. *

* * @return The name of the cluster subnet group. */ public String getClusterSubnetGroupName() { return this.clusterSubnetGroupName; } /** *

* The name of the cluster subnet group. *

* * @param clusterSubnetGroupName * The name of the cluster subnet group. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSubnetGroup withClusterSubnetGroupName(String clusterSubnetGroupName) { setClusterSubnetGroupName(clusterSubnetGroupName); return this; } /** *

* The description of the cluster subnet group. *

* * @param description * The description of the cluster subnet group. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the cluster subnet group. *

* * @return The description of the cluster subnet group. */ public String getDescription() { return this.description; } /** *

* The description of the cluster subnet group. *

* * @param description * The description of the cluster subnet group. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSubnetGroup withDescription(String description) { setDescription(description); return this; } /** *

* The VPC ID of the cluster subnet group. *

* * @param vpcId * The VPC ID of the cluster subnet group. */ public void setVpcId(String vpcId) { this.vpcId = vpcId; } /** *

* The VPC ID of the cluster subnet group. *

* * @return The VPC ID of the cluster subnet group. */ public String getVpcId() { return this.vpcId; } /** *

* The VPC ID of the cluster subnet group. *

* * @param vpcId * The VPC ID of the cluster subnet group. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSubnetGroup withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** *

* The status of the cluster subnet group. Possible values are Complete, Incomplete and * Invalid. *

* * @param subnetGroupStatus * The status of the cluster subnet group. Possible values are Complete, Incomplete * and Invalid. */ public void setSubnetGroupStatus(String subnetGroupStatus) { this.subnetGroupStatus = subnetGroupStatus; } /** *

* The status of the cluster subnet group. Possible values are Complete, Incomplete and * Invalid. *

* * @return The status of the cluster subnet group. Possible values are Complete, * Incomplete and Invalid. */ public String getSubnetGroupStatus() { return this.subnetGroupStatus; } /** *

* The status of the cluster subnet group. Possible values are Complete, Incomplete and * Invalid. *

* * @param subnetGroupStatus * The status of the cluster subnet group. Possible values are Complete, Incomplete * and Invalid. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSubnetGroup withSubnetGroupStatus(String subnetGroupStatus) { setSubnetGroupStatus(subnetGroupStatus); return this; } /** *

* A list of the VPC Subnet elements. *

* * @return A list of the VPC Subnet elements. */ public java.util.List getSubnets() { if (subnets == null) { subnets = new com.amazonaws.internal.SdkInternalList(); } return subnets; } /** *

* A list of the VPC Subnet elements. *

* * @param subnets * A list of the VPC Subnet elements. */ public void setSubnets(java.util.Collection subnets) { if (subnets == null) { this.subnets = null; return; } this.subnets = new com.amazonaws.internal.SdkInternalList(subnets); } /** *

* A list of the VPC Subnet elements. *

*

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

* * @param subnets * A list of the VPC Subnet elements. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSubnetGroup withSubnets(Subnet... subnets) { if (this.subnets == null) { setSubnets(new com.amazonaws.internal.SdkInternalList(subnets.length)); } for (Subnet ele : subnets) { this.subnets.add(ele); } return this; } /** *

* A list of the VPC Subnet elements. *

* * @param subnets * A list of the VPC Subnet elements. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSubnetGroup withSubnets(java.util.Collection subnets) { setSubnets(subnets); return this; } /** *

* The list of tags for the cluster subnet group. *

* * @return The list of tags for the cluster subnet group. */ public java.util.List getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* The list of tags for the cluster subnet group. *

* * @param tags * The list of tags for the cluster subnet group. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* The list of tags for the cluster subnet 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 subnet group. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSubnetGroup withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* The list of tags for the cluster subnet group. *

* * @param tags * The list of tags for the cluster subnet group. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSubnetGroup withTags(java.util.Collection tags) { setTags(tags); return this; } /** *

* The IP address types supported by this cluster subnet group. Possible values are ipv4 and * dualstack. *

* * @return The IP address types supported by this cluster subnet group. Possible values are ipv4 and * dualstack. */ public java.util.List getSupportedClusterIpAddressTypes() { if (supportedClusterIpAddressTypes == null) { supportedClusterIpAddressTypes = new com.amazonaws.internal.SdkInternalList(); } return supportedClusterIpAddressTypes; } /** *

* The IP address types supported by this cluster subnet group. Possible values are ipv4 and * dualstack. *

* * @param supportedClusterIpAddressTypes * The IP address types supported by this cluster subnet group. Possible values are ipv4 and * dualstack. */ public void setSupportedClusterIpAddressTypes(java.util.Collection supportedClusterIpAddressTypes) { if (supportedClusterIpAddressTypes == null) { this.supportedClusterIpAddressTypes = null; return; } this.supportedClusterIpAddressTypes = new com.amazonaws.internal.SdkInternalList(supportedClusterIpAddressTypes); } /** *

* The IP address types supported by this cluster subnet group. Possible values are ipv4 and * dualstack. *

*

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

* * @param supportedClusterIpAddressTypes * The IP address types supported by this cluster subnet group. Possible values are ipv4 and * dualstack. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSubnetGroup withSupportedClusterIpAddressTypes(String... supportedClusterIpAddressTypes) { if (this.supportedClusterIpAddressTypes == null) { setSupportedClusterIpAddressTypes(new com.amazonaws.internal.SdkInternalList(supportedClusterIpAddressTypes.length)); } for (String ele : supportedClusterIpAddressTypes) { this.supportedClusterIpAddressTypes.add(ele); } return this; } /** *

* The IP address types supported by this cluster subnet group. Possible values are ipv4 and * dualstack. *

* * @param supportedClusterIpAddressTypes * The IP address types supported by this cluster subnet group. Possible values are ipv4 and * dualstack. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterSubnetGroup withSupportedClusterIpAddressTypes(java.util.Collection supportedClusterIpAddressTypes) { setSupportedClusterIpAddressTypes(supportedClusterIpAddressTypes); 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 (getClusterSubnetGroupName() != null) sb.append("ClusterSubnetGroupName: ").append(getClusterSubnetGroupName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getVpcId() != null) sb.append("VpcId: ").append(getVpcId()).append(","); if (getSubnetGroupStatus() != null) sb.append("SubnetGroupStatus: ").append(getSubnetGroupStatus()).append(","); if (getSubnets() != null) sb.append("Subnets: ").append(getSubnets()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getSupportedClusterIpAddressTypes() != null) sb.append("SupportedClusterIpAddressTypes: ").append(getSupportedClusterIpAddressTypes()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ClusterSubnetGroup == false) return false; ClusterSubnetGroup other = (ClusterSubnetGroup) obj; if (other.getClusterSubnetGroupName() == null ^ this.getClusterSubnetGroupName() == null) return false; if (other.getClusterSubnetGroupName() != null && other.getClusterSubnetGroupName().equals(this.getClusterSubnetGroupName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getVpcId() == null ^ this.getVpcId() == null) return false; if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == false) return false; if (other.getSubnetGroupStatus() == null ^ this.getSubnetGroupStatus() == null) return false; if (other.getSubnetGroupStatus() != null && other.getSubnetGroupStatus().equals(this.getSubnetGroupStatus()) == false) return false; if (other.getSubnets() == null ^ this.getSubnets() == null) return false; if (other.getSubnets() != null && other.getSubnets().equals(this.getSubnets()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getSupportedClusterIpAddressTypes() == null ^ this.getSupportedClusterIpAddressTypes() == null) return false; if (other.getSupportedClusterIpAddressTypes() != null && other.getSupportedClusterIpAddressTypes().equals(this.getSupportedClusterIpAddressTypes()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterSubnetGroupName() == null) ? 0 : getClusterSubnetGroupName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode()); hashCode = prime * hashCode + ((getSubnetGroupStatus() == null) ? 0 : getSubnetGroupStatus().hashCode()); hashCode = prime * hashCode + ((getSubnets() == null) ? 0 : getSubnets().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getSupportedClusterIpAddressTypes() == null) ? 0 : getSupportedClusterIpAddressTypes().hashCode()); return hashCode; } @Override public ClusterSubnetGroup clone() { try { return (ClusterSubnetGroup) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy