com.amazonaws.services.ec2.model.CreateSubnetRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 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.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CreateSubnetRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateSubnetRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest {
/**
*
* The tags to assign to the subnet.
*
*/
private com.amazonaws.internal.SdkInternalList tagSpecifications;
/**
*
* The Availability Zone or Local Zone for the subnet.
*
*
* Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we do not
* necessarily select a different zone for each subnet.
*
*
* To create a subnet in a Local Zone, set this value to the Local Zone ID, for example
* us-west-2-lax-1a
. For information about the Regions that support Local Zones, see Available Local Zones.
*
*
* To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost
* ARN.
*
*/
private String availabilityZone;
/**
*
* The AZ ID or the Local Zone ID of the subnet.
*
*/
private String availabilityZoneId;
/**
*
* The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24
. We modify the
* specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
, we modify it
* to 100.68.0.0/18
.
*
*
* This parameter is not supported for an IPv6 only subnet.
*
*/
private String cidrBlock;
/**
*
* The IPv6 network range for the subnet, in CIDR notation. This parameter is required for an IPv6 only subnet.
*
*/
private String ipv6CidrBlock;
/**
*
* The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the
* Availability Zone of the Outpost subnet.
*
*/
private String outpostArn;
/**
*
* The ID of the VPC.
*
*/
private String vpcId;
/**
*
* Indicates whether to create an IPv6 only subnet.
*
*/
private Boolean ipv6Native;
/**
*
* An IPv4 IPAM pool ID for the subnet.
*
*/
private String ipv4IpamPoolId;
/**
*
* An IPv4 netmask length for the subnet.
*
*/
private Integer ipv4NetmaskLength;
/**
*
* An IPv6 IPAM pool ID for the subnet.
*
*/
private String ipv6IpamPoolId;
/**
*
* An IPv6 netmask length for the subnet.
*
*/
private Integer ipv6NetmaskLength;
/**
* Default constructor for CreateSubnetRequest object. Callers should use the setter or fluent setter (with...)
* methods to initialize the object after creating it.
*/
public CreateSubnetRequest() {
}
/**
* Constructs a new CreateSubnetRequest object. Callers should use the setter or fluent setter (with...) methods to
* initialize any additional object members.
*
* @param vpcId
* The ID of the VPC.
* @param cidrBlock
* The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24
. We modify
* the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
,
* we modify it to 100.68.0.0/18
.
*
* This parameter is not supported for an IPv6 only subnet.
*/
public CreateSubnetRequest(String vpcId, String cidrBlock) {
setVpcId(vpcId);
setCidrBlock(cidrBlock);
}
/**
*
* The tags to assign to the subnet.
*
*
* @return The tags to assign to the subnet.
*/
public java.util.List getTagSpecifications() {
if (tagSpecifications == null) {
tagSpecifications = new com.amazonaws.internal.SdkInternalList();
}
return tagSpecifications;
}
/**
*
* The tags to assign to the subnet.
*
*
* @param tagSpecifications
* The tags to assign to the subnet.
*/
public void setTagSpecifications(java.util.Collection tagSpecifications) {
if (tagSpecifications == null) {
this.tagSpecifications = null;
return;
}
this.tagSpecifications = new com.amazonaws.internal.SdkInternalList(tagSpecifications);
}
/**
*
* The tags to assign to the subnet.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTagSpecifications(java.util.Collection)} or {@link #withTagSpecifications(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param tagSpecifications
* The tags to assign to the subnet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withTagSpecifications(TagSpecification... tagSpecifications) {
if (this.tagSpecifications == null) {
setTagSpecifications(new com.amazonaws.internal.SdkInternalList(tagSpecifications.length));
}
for (TagSpecification ele : tagSpecifications) {
this.tagSpecifications.add(ele);
}
return this;
}
/**
*
* The tags to assign to the subnet.
*
*
* @param tagSpecifications
* The tags to assign to the subnet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withTagSpecifications(java.util.Collection tagSpecifications) {
setTagSpecifications(tagSpecifications);
return this;
}
/**
*
* The Availability Zone or Local Zone for the subnet.
*
*
* Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we do not
* necessarily select a different zone for each subnet.
*
*
* To create a subnet in a Local Zone, set this value to the Local Zone ID, for example
* us-west-2-lax-1a
. For information about the Regions that support Local Zones, see Available Local Zones.
*
*
* To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost
* ARN.
*
*
* @param availabilityZone
* The Availability Zone or Local Zone for the subnet.
*
* Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we do
* not necessarily select a different zone for each subnet.
*
*
* To create a subnet in a Local Zone, set this value to the Local Zone ID, for example
* us-west-2-lax-1a
. For information about the Regions that support Local Zones, see Available Local
* Zones.
*
*
* To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the
* Outpost ARN.
*/
public void setAvailabilityZone(String availabilityZone) {
this.availabilityZone = availabilityZone;
}
/**
*
* The Availability Zone or Local Zone for the subnet.
*
*
* Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we do not
* necessarily select a different zone for each subnet.
*
*
* To create a subnet in a Local Zone, set this value to the Local Zone ID, for example
* us-west-2-lax-1a
. For information about the Regions that support Local Zones, see Available Local Zones.
*
*
* To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost
* ARN.
*
*
* @return The Availability Zone or Local Zone for the subnet.
*
* Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we do
* not necessarily select a different zone for each subnet.
*
*
* To create a subnet in a Local Zone, set this value to the Local Zone ID, for example
* us-west-2-lax-1a
. For information about the Regions that support Local Zones, see Available Local
* Zones.
*
*
* To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the
* Outpost ARN.
*/
public String getAvailabilityZone() {
return this.availabilityZone;
}
/**
*
* The Availability Zone or Local Zone for the subnet.
*
*
* Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we do not
* necessarily select a different zone for each subnet.
*
*
* To create a subnet in a Local Zone, set this value to the Local Zone ID, for example
* us-west-2-lax-1a
. For information about the Regions that support Local Zones, see Available Local Zones.
*
*
* To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost
* ARN.
*
*
* @param availabilityZone
* The Availability Zone or Local Zone for the subnet.
*
* Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we do
* not necessarily select a different zone for each subnet.
*
*
* To create a subnet in a Local Zone, set this value to the Local Zone ID, for example
* us-west-2-lax-1a
. For information about the Regions that support Local Zones, see Available Local
* Zones.
*
*
* To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the
* Outpost ARN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withAvailabilityZone(String availabilityZone) {
setAvailabilityZone(availabilityZone);
return this;
}
/**
*
* The AZ ID or the Local Zone ID of the subnet.
*
*
* @param availabilityZoneId
* The AZ ID or the Local Zone ID of the subnet.
*/
public void setAvailabilityZoneId(String availabilityZoneId) {
this.availabilityZoneId = availabilityZoneId;
}
/**
*
* The AZ ID or the Local Zone ID of the subnet.
*
*
* @return The AZ ID or the Local Zone ID of the subnet.
*/
public String getAvailabilityZoneId() {
return this.availabilityZoneId;
}
/**
*
* The AZ ID or the Local Zone ID of the subnet.
*
*
* @param availabilityZoneId
* The AZ ID or the Local Zone ID of the subnet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withAvailabilityZoneId(String availabilityZoneId) {
setAvailabilityZoneId(availabilityZoneId);
return this;
}
/**
*
* The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24
. We modify the
* specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
, we modify it
* to 100.68.0.0/18
.
*
*
* This parameter is not supported for an IPv6 only subnet.
*
*
* @param cidrBlock
* The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24
. We modify
* the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
,
* we modify it to 100.68.0.0/18
.
*
* This parameter is not supported for an IPv6 only subnet.
*/
public void setCidrBlock(String cidrBlock) {
this.cidrBlock = cidrBlock;
}
/**
*
* The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24
. We modify the
* specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
, we modify it
* to 100.68.0.0/18
.
*
*
* This parameter is not supported for an IPv6 only subnet.
*
*
* @return The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24
. We modify
* the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
,
* we modify it to 100.68.0.0/18
.
*
* This parameter is not supported for an IPv6 only subnet.
*/
public String getCidrBlock() {
return this.cidrBlock;
}
/**
*
* The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24
. We modify the
* specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
, we modify it
* to 100.68.0.0/18
.
*
*
* This parameter is not supported for an IPv6 only subnet.
*
*
* @param cidrBlock
* The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24
. We modify
* the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
,
* we modify it to 100.68.0.0/18
.
*
* This parameter is not supported for an IPv6 only subnet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withCidrBlock(String cidrBlock) {
setCidrBlock(cidrBlock);
return this;
}
/**
*
* The IPv6 network range for the subnet, in CIDR notation. This parameter is required for an IPv6 only subnet.
*
*
* @param ipv6CidrBlock
* The IPv6 network range for the subnet, in CIDR notation. This parameter is required for an IPv6 only
* subnet.
*/
public void setIpv6CidrBlock(String ipv6CidrBlock) {
this.ipv6CidrBlock = ipv6CidrBlock;
}
/**
*
* The IPv6 network range for the subnet, in CIDR notation. This parameter is required for an IPv6 only subnet.
*
*
* @return The IPv6 network range for the subnet, in CIDR notation. This parameter is required for an IPv6 only
* subnet.
*/
public String getIpv6CidrBlock() {
return this.ipv6CidrBlock;
}
/**
*
* The IPv6 network range for the subnet, in CIDR notation. This parameter is required for an IPv6 only subnet.
*
*
* @param ipv6CidrBlock
* The IPv6 network range for the subnet, in CIDR notation. This parameter is required for an IPv6 only
* subnet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withIpv6CidrBlock(String ipv6CidrBlock) {
setIpv6CidrBlock(ipv6CidrBlock);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the
* Availability Zone of the Outpost subnet.
*
*
* @param outpostArn
* The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the
* Availability Zone of the Outpost subnet.
*/
public void setOutpostArn(String outpostArn) {
this.outpostArn = outpostArn;
}
/**
*
* The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the
* Availability Zone of the Outpost subnet.
*
*
* @return The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the
* Availability Zone of the Outpost subnet.
*/
public String getOutpostArn() {
return this.outpostArn;
}
/**
*
* The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the
* Availability Zone of the Outpost subnet.
*
*
* @param outpostArn
* The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the
* Availability Zone of the Outpost subnet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withOutpostArn(String outpostArn) {
setOutpostArn(outpostArn);
return this;
}
/**
*
* The ID of the VPC.
*
*
* @param vpcId
* The ID of the VPC.
*/
public void setVpcId(String vpcId) {
this.vpcId = vpcId;
}
/**
*
* The ID of the VPC.
*
*
* @return The ID of the VPC.
*/
public String getVpcId() {
return this.vpcId;
}
/**
*
* The ID of the VPC.
*
*
* @param vpcId
* The ID of the VPC.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withVpcId(String vpcId) {
setVpcId(vpcId);
return this;
}
/**
*
* Indicates whether to create an IPv6 only subnet.
*
*
* @param ipv6Native
* Indicates whether to create an IPv6 only subnet.
*/
public void setIpv6Native(Boolean ipv6Native) {
this.ipv6Native = ipv6Native;
}
/**
*
* Indicates whether to create an IPv6 only subnet.
*
*
* @return Indicates whether to create an IPv6 only subnet.
*/
public Boolean getIpv6Native() {
return this.ipv6Native;
}
/**
*
* Indicates whether to create an IPv6 only subnet.
*
*
* @param ipv6Native
* Indicates whether to create an IPv6 only subnet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withIpv6Native(Boolean ipv6Native) {
setIpv6Native(ipv6Native);
return this;
}
/**
*
* Indicates whether to create an IPv6 only subnet.
*
*
* @return Indicates whether to create an IPv6 only subnet.
*/
public Boolean isIpv6Native() {
return this.ipv6Native;
}
/**
*
* An IPv4 IPAM pool ID for the subnet.
*
*
* @param ipv4IpamPoolId
* An IPv4 IPAM pool ID for the subnet.
*/
public void setIpv4IpamPoolId(String ipv4IpamPoolId) {
this.ipv4IpamPoolId = ipv4IpamPoolId;
}
/**
*
* An IPv4 IPAM pool ID for the subnet.
*
*
* @return An IPv4 IPAM pool ID for the subnet.
*/
public String getIpv4IpamPoolId() {
return this.ipv4IpamPoolId;
}
/**
*
* An IPv4 IPAM pool ID for the subnet.
*
*
* @param ipv4IpamPoolId
* An IPv4 IPAM pool ID for the subnet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withIpv4IpamPoolId(String ipv4IpamPoolId) {
setIpv4IpamPoolId(ipv4IpamPoolId);
return this;
}
/**
*
* An IPv4 netmask length for the subnet.
*
*
* @param ipv4NetmaskLength
* An IPv4 netmask length for the subnet.
*/
public void setIpv4NetmaskLength(Integer ipv4NetmaskLength) {
this.ipv4NetmaskLength = ipv4NetmaskLength;
}
/**
*
* An IPv4 netmask length for the subnet.
*
*
* @return An IPv4 netmask length for the subnet.
*/
public Integer getIpv4NetmaskLength() {
return this.ipv4NetmaskLength;
}
/**
*
* An IPv4 netmask length for the subnet.
*
*
* @param ipv4NetmaskLength
* An IPv4 netmask length for the subnet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withIpv4NetmaskLength(Integer ipv4NetmaskLength) {
setIpv4NetmaskLength(ipv4NetmaskLength);
return this;
}
/**
*
* An IPv6 IPAM pool ID for the subnet.
*
*
* @param ipv6IpamPoolId
* An IPv6 IPAM pool ID for the subnet.
*/
public void setIpv6IpamPoolId(String ipv6IpamPoolId) {
this.ipv6IpamPoolId = ipv6IpamPoolId;
}
/**
*
* An IPv6 IPAM pool ID for the subnet.
*
*
* @return An IPv6 IPAM pool ID for the subnet.
*/
public String getIpv6IpamPoolId() {
return this.ipv6IpamPoolId;
}
/**
*
* An IPv6 IPAM pool ID for the subnet.
*
*
* @param ipv6IpamPoolId
* An IPv6 IPAM pool ID for the subnet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withIpv6IpamPoolId(String ipv6IpamPoolId) {
setIpv6IpamPoolId(ipv6IpamPoolId);
return this;
}
/**
*
* An IPv6 netmask length for the subnet.
*
*
* @param ipv6NetmaskLength
* An IPv6 netmask length for the subnet.
*/
public void setIpv6NetmaskLength(Integer ipv6NetmaskLength) {
this.ipv6NetmaskLength = ipv6NetmaskLength;
}
/**
*
* An IPv6 netmask length for the subnet.
*
*
* @return An IPv6 netmask length for the subnet.
*/
public Integer getIpv6NetmaskLength() {
return this.ipv6NetmaskLength;
}
/**
*
* An IPv6 netmask length for the subnet.
*
*
* @param ipv6NetmaskLength
* An IPv6 netmask length for the subnet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSubnetRequest withIpv6NetmaskLength(Integer ipv6NetmaskLength) {
setIpv6NetmaskLength(ipv6NetmaskLength);
return this;
}
/**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/
@Override
public Request getDryRunRequest() {
Request request = new CreateSubnetRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
}
/**
* 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 (getTagSpecifications() != null)
sb.append("TagSpecifications: ").append(getTagSpecifications()).append(",");
if (getAvailabilityZone() != null)
sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(",");
if (getAvailabilityZoneId() != null)
sb.append("AvailabilityZoneId: ").append(getAvailabilityZoneId()).append(",");
if (getCidrBlock() != null)
sb.append("CidrBlock: ").append(getCidrBlock()).append(",");
if (getIpv6CidrBlock() != null)
sb.append("Ipv6CidrBlock: ").append(getIpv6CidrBlock()).append(",");
if (getOutpostArn() != null)
sb.append("OutpostArn: ").append(getOutpostArn()).append(",");
if (getVpcId() != null)
sb.append("VpcId: ").append(getVpcId()).append(",");
if (getIpv6Native() != null)
sb.append("Ipv6Native: ").append(getIpv6Native()).append(",");
if (getIpv4IpamPoolId() != null)
sb.append("Ipv4IpamPoolId: ").append(getIpv4IpamPoolId()).append(",");
if (getIpv4NetmaskLength() != null)
sb.append("Ipv4NetmaskLength: ").append(getIpv4NetmaskLength()).append(",");
if (getIpv6IpamPoolId() != null)
sb.append("Ipv6IpamPoolId: ").append(getIpv6IpamPoolId()).append(",");
if (getIpv6NetmaskLength() != null)
sb.append("Ipv6NetmaskLength: ").append(getIpv6NetmaskLength());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateSubnetRequest == false)
return false;
CreateSubnetRequest other = (CreateSubnetRequest) obj;
if (other.getTagSpecifications() == null ^ this.getTagSpecifications() == null)
return false;
if (other.getTagSpecifications() != null && other.getTagSpecifications().equals(this.getTagSpecifications()) == false)
return false;
if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null)
return false;
if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false)
return false;
if (other.getAvailabilityZoneId() == null ^ this.getAvailabilityZoneId() == null)
return false;
if (other.getAvailabilityZoneId() != null && other.getAvailabilityZoneId().equals(this.getAvailabilityZoneId()) == false)
return false;
if (other.getCidrBlock() == null ^ this.getCidrBlock() == null)
return false;
if (other.getCidrBlock() != null && other.getCidrBlock().equals(this.getCidrBlock()) == false)
return false;
if (other.getIpv6CidrBlock() == null ^ this.getIpv6CidrBlock() == null)
return false;
if (other.getIpv6CidrBlock() != null && other.getIpv6CidrBlock().equals(this.getIpv6CidrBlock()) == false)
return false;
if (other.getOutpostArn() == null ^ this.getOutpostArn() == null)
return false;
if (other.getOutpostArn() != null && other.getOutpostArn().equals(this.getOutpostArn()) == 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.getIpv6Native() == null ^ this.getIpv6Native() == null)
return false;
if (other.getIpv6Native() != null && other.getIpv6Native().equals(this.getIpv6Native()) == false)
return false;
if (other.getIpv4IpamPoolId() == null ^ this.getIpv4IpamPoolId() == null)
return false;
if (other.getIpv4IpamPoolId() != null && other.getIpv4IpamPoolId().equals(this.getIpv4IpamPoolId()) == false)
return false;
if (other.getIpv4NetmaskLength() == null ^ this.getIpv4NetmaskLength() == null)
return false;
if (other.getIpv4NetmaskLength() != null && other.getIpv4NetmaskLength().equals(this.getIpv4NetmaskLength()) == false)
return false;
if (other.getIpv6IpamPoolId() == null ^ this.getIpv6IpamPoolId() == null)
return false;
if (other.getIpv6IpamPoolId() != null && other.getIpv6IpamPoolId().equals(this.getIpv6IpamPoolId()) == false)
return false;
if (other.getIpv6NetmaskLength() == null ^ this.getIpv6NetmaskLength() == null)
return false;
if (other.getIpv6NetmaskLength() != null && other.getIpv6NetmaskLength().equals(this.getIpv6NetmaskLength()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTagSpecifications() == null) ? 0 : getTagSpecifications().hashCode());
hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode());
hashCode = prime * hashCode + ((getAvailabilityZoneId() == null) ? 0 : getAvailabilityZoneId().hashCode());
hashCode = prime * hashCode + ((getCidrBlock() == null) ? 0 : getCidrBlock().hashCode());
hashCode = prime * hashCode + ((getIpv6CidrBlock() == null) ? 0 : getIpv6CidrBlock().hashCode());
hashCode = prime * hashCode + ((getOutpostArn() == null) ? 0 : getOutpostArn().hashCode());
hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode());
hashCode = prime * hashCode + ((getIpv6Native() == null) ? 0 : getIpv6Native().hashCode());
hashCode = prime * hashCode + ((getIpv4IpamPoolId() == null) ? 0 : getIpv4IpamPoolId().hashCode());
hashCode = prime * hashCode + ((getIpv4NetmaskLength() == null) ? 0 : getIpv4NetmaskLength().hashCode());
hashCode = prime * hashCode + ((getIpv6IpamPoolId() == null) ? 0 : getIpv6IpamPoolId().hashCode());
hashCode = prime * hashCode + ((getIpv6NetmaskLength() == null) ? 0 : getIpv6NetmaskLength().hashCode());
return hashCode;
}
@Override
public CreateSubnetRequest clone() {
return (CreateSubnetRequest) super.clone();
}
}