com.amazonaws.services.securityhub.model.AwsRdsDbSubnetGroup Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub Show documentation
/*
* 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.securityhub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about the subnet group for the database instance.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AwsRdsDbSubnetGroup implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the subnet group.
*
*/
private String dbSubnetGroupName;
/**
*
* The description of the subnet group.
*
*/
private String dbSubnetGroupDescription;
/**
*
* The VPC ID of the subnet group.
*
*/
private String vpcId;
/**
*
* The status of the subnet group.
*
*/
private String subnetGroupStatus;
/**
*
* A list of subnets in the subnet group.
*
*/
private java.util.List subnets;
/**
*
* The ARN of the subnet group.
*
*/
private String dbSubnetGroupArn;
/**
*
* The name of the subnet group.
*
*
* @param dbSubnetGroupName
* The name of the subnet group.
*/
public void setDbSubnetGroupName(String dbSubnetGroupName) {
this.dbSubnetGroupName = dbSubnetGroupName;
}
/**
*
* The name of the subnet group.
*
*
* @return The name of the subnet group.
*/
public String getDbSubnetGroupName() {
return this.dbSubnetGroupName;
}
/**
*
* The name of the subnet group.
*
*
* @param dbSubnetGroupName
* The name of the subnet group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsRdsDbSubnetGroup withDbSubnetGroupName(String dbSubnetGroupName) {
setDbSubnetGroupName(dbSubnetGroupName);
return this;
}
/**
*
* The description of the subnet group.
*
*
* @param dbSubnetGroupDescription
* The description of the subnet group.
*/
public void setDbSubnetGroupDescription(String dbSubnetGroupDescription) {
this.dbSubnetGroupDescription = dbSubnetGroupDescription;
}
/**
*
* The description of the subnet group.
*
*
* @return The description of the subnet group.
*/
public String getDbSubnetGroupDescription() {
return this.dbSubnetGroupDescription;
}
/**
*
* The description of the subnet group.
*
*
* @param dbSubnetGroupDescription
* The description of the subnet group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsRdsDbSubnetGroup withDbSubnetGroupDescription(String dbSubnetGroupDescription) {
setDbSubnetGroupDescription(dbSubnetGroupDescription);
return this;
}
/**
*
* The VPC ID of the subnet group.
*
*
* @param vpcId
* The VPC ID of the subnet group.
*/
public void setVpcId(String vpcId) {
this.vpcId = vpcId;
}
/**
*
* The VPC ID of the subnet group.
*
*
* @return The VPC ID of the subnet group.
*/
public String getVpcId() {
return this.vpcId;
}
/**
*
* The VPC ID of the subnet group.
*
*
* @param vpcId
* The VPC ID of the subnet group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsRdsDbSubnetGroup withVpcId(String vpcId) {
setVpcId(vpcId);
return this;
}
/**
*
* The status of the subnet group.
*
*
* @param subnetGroupStatus
* The status of the subnet group.
*/
public void setSubnetGroupStatus(String subnetGroupStatus) {
this.subnetGroupStatus = subnetGroupStatus;
}
/**
*
* The status of the subnet group.
*
*
* @return The status of the subnet group.
*/
public String getSubnetGroupStatus() {
return this.subnetGroupStatus;
}
/**
*
* The status of the subnet group.
*
*
* @param subnetGroupStatus
* The status of the subnet group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsRdsDbSubnetGroup withSubnetGroupStatus(String subnetGroupStatus) {
setSubnetGroupStatus(subnetGroupStatus);
return this;
}
/**
*
* A list of subnets in the subnet group.
*
*
* @return A list of subnets in the subnet group.
*/
public java.util.List getSubnets() {
return subnets;
}
/**
*
* A list of subnets in the subnet group.
*
*
* @param subnets
* A list of subnets in the subnet group.
*/
public void setSubnets(java.util.Collection subnets) {
if (subnets == null) {
this.subnets = null;
return;
}
this.subnets = new java.util.ArrayList(subnets);
}
/**
*
* A list of subnets in the subnet group.
*
*
* 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 subnets in the subnet group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsRdsDbSubnetGroup withSubnets(AwsRdsDbSubnetGroupSubnet... subnets) {
if (this.subnets == null) {
setSubnets(new java.util.ArrayList(subnets.length));
}
for (AwsRdsDbSubnetGroupSubnet ele : subnets) {
this.subnets.add(ele);
}
return this;
}
/**
*
* A list of subnets in the subnet group.
*
*
* @param subnets
* A list of subnets in the subnet group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsRdsDbSubnetGroup withSubnets(java.util.Collection subnets) {
setSubnets(subnets);
return this;
}
/**
*
* The ARN of the subnet group.
*
*
* @param dbSubnetGroupArn
* The ARN of the subnet group.
*/
public void setDbSubnetGroupArn(String dbSubnetGroupArn) {
this.dbSubnetGroupArn = dbSubnetGroupArn;
}
/**
*
* The ARN of the subnet group.
*
*
* @return The ARN of the subnet group.
*/
public String getDbSubnetGroupArn() {
return this.dbSubnetGroupArn;
}
/**
*
* The ARN of the subnet group.
*
*
* @param dbSubnetGroupArn
* The ARN of the subnet group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsRdsDbSubnetGroup withDbSubnetGroupArn(String dbSubnetGroupArn) {
setDbSubnetGroupArn(dbSubnetGroupArn);
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 (getDbSubnetGroupName() != null)
sb.append("DbSubnetGroupName: ").append(getDbSubnetGroupName()).append(",");
if (getDbSubnetGroupDescription() != null)
sb.append("DbSubnetGroupDescription: ").append(getDbSubnetGroupDescription()).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 (getDbSubnetGroupArn() != null)
sb.append("DbSubnetGroupArn: ").append(getDbSubnetGroupArn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AwsRdsDbSubnetGroup == false)
return false;
AwsRdsDbSubnetGroup other = (AwsRdsDbSubnetGroup) obj;
if (other.getDbSubnetGroupName() == null ^ this.getDbSubnetGroupName() == null)
return false;
if (other.getDbSubnetGroupName() != null && other.getDbSubnetGroupName().equals(this.getDbSubnetGroupName()) == false)
return false;
if (other.getDbSubnetGroupDescription() == null ^ this.getDbSubnetGroupDescription() == null)
return false;
if (other.getDbSubnetGroupDescription() != null && other.getDbSubnetGroupDescription().equals(this.getDbSubnetGroupDescription()) == 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.getDbSubnetGroupArn() == null ^ this.getDbSubnetGroupArn() == null)
return false;
if (other.getDbSubnetGroupArn() != null && other.getDbSubnetGroupArn().equals(this.getDbSubnetGroupArn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDbSubnetGroupName() == null) ? 0 : getDbSubnetGroupName().hashCode());
hashCode = prime * hashCode + ((getDbSubnetGroupDescription() == null) ? 0 : getDbSubnetGroupDescription().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 + ((getDbSubnetGroupArn() == null) ? 0 : getDbSubnetGroupArn().hashCode());
return hashCode;
}
@Override
public AwsRdsDbSubnetGroup clone() {
try {
return (AwsRdsDbSubnetGroup) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.securityhub.model.transform.AwsRdsDbSubnetGroupMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}