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

com.amazonaws.services.ec2.model.Subnet Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
Show 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.ec2.model;

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

/**
 * 

* Describes a subnet. *

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

* The Availability Zone of the subnet. *

*/ private String availabilityZone; /** *

* The AZ ID of the subnet. *

*/ private String availabilityZoneId; /** *

* The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are * considered unavailable. *

*/ private Integer availableIpAddressCount; /** *

* The IPv4 CIDR block assigned to the subnet. *

*/ private String cidrBlock; /** *

* Indicates whether this is the default subnet for the Availability Zone. *

*/ private Boolean defaultForAz; /** *

* Indicates the device position for local network interfaces in this subnet. For example, 1 indicates * local network interfaces in this subnet are the secondary network interface (eth1). *

*/ private Integer enableLniAtDeviceIndex; /** *

* Indicates whether instances launched in this subnet receive a public IPv4 address. *

*

* Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with * running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the * Amazon VPC pricing page. *

*/ private Boolean mapPublicIpOnLaunch; /** *

* Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives a customer-owned IPv4 address. *

*/ private Boolean mapCustomerOwnedIpOnLaunch; /** *

* The customer-owned IPv4 address pool associated with the subnet. *

*/ private String customerOwnedIpv4Pool; /** *

* The current state of the subnet. *

*/ private String state; /** *

* The ID of the subnet. *

*/ private String subnetId; /** *

* The ID of the VPC the subnet is in. *

*/ private String vpcId; /** *

* The ID of the Amazon Web Services account that owns the subnet. *

*/ private String ownerId; /** *

* Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives an IPv6 address. *

*/ private Boolean assignIpv6AddressOnCreation; /** *

* Information about the IPv6 CIDR blocks associated with the subnet. *

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

* Any tags assigned to the subnet. *

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

* The Amazon Resource Name (ARN) of the subnet. *

*/ private String subnetArn; /** *

* The Amazon Resource Name (ARN) of the Outpost. *

*/ private String outpostArn; /** *

* Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic * IPv6 addresses for IPv4-only destinations. *

*/ private Boolean enableDns64; /** *

* Indicates whether this is an IPv6 only subnet. *

*/ private Boolean ipv6Native; /** *

* The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 * address or ID of the instance. *

*/ private PrivateDnsNameOptionsOnLaunch privateDnsNameOptionsOnLaunch; /** *

* The Availability Zone of the subnet. *

* * @param availabilityZone * The Availability Zone of the subnet. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** *

* The Availability Zone of the subnet. *

* * @return The Availability Zone of the subnet. */ public String getAvailabilityZone() { return this.availabilityZone; } /** *

* The Availability Zone of the subnet. *

* * @param availabilityZone * The Availability Zone of the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** *

* The AZ ID of the subnet. *

* * @param availabilityZoneId * The AZ ID of the subnet. */ public void setAvailabilityZoneId(String availabilityZoneId) { this.availabilityZoneId = availabilityZoneId; } /** *

* The AZ ID of the subnet. *

* * @return The AZ ID of the subnet. */ public String getAvailabilityZoneId() { return this.availabilityZoneId; } /** *

* The AZ ID of the subnet. *

* * @param availabilityZoneId * The AZ ID of the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withAvailabilityZoneId(String availabilityZoneId) { setAvailabilityZoneId(availabilityZoneId); return this; } /** *

* The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are * considered unavailable. *

* * @param availableIpAddressCount * The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances * are considered unavailable. */ public void setAvailableIpAddressCount(Integer availableIpAddressCount) { this.availableIpAddressCount = availableIpAddressCount; } /** *

* The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are * considered unavailable. *

* * @return The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances * are considered unavailable. */ public Integer getAvailableIpAddressCount() { return this.availableIpAddressCount; } /** *

* The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are * considered unavailable. *

* * @param availableIpAddressCount * The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances * are considered unavailable. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withAvailableIpAddressCount(Integer availableIpAddressCount) { setAvailableIpAddressCount(availableIpAddressCount); return this; } /** *

* The IPv4 CIDR block assigned to the subnet. *

* * @param cidrBlock * The IPv4 CIDR block assigned to the subnet. */ public void setCidrBlock(String cidrBlock) { this.cidrBlock = cidrBlock; } /** *

* The IPv4 CIDR block assigned to the subnet. *

* * @return The IPv4 CIDR block assigned to the subnet. */ public String getCidrBlock() { return this.cidrBlock; } /** *

* The IPv4 CIDR block assigned to the subnet. *

* * @param cidrBlock * The IPv4 CIDR block assigned to the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withCidrBlock(String cidrBlock) { setCidrBlock(cidrBlock); return this; } /** *

* Indicates whether this is the default subnet for the Availability Zone. *

* * @param defaultForAz * Indicates whether this is the default subnet for the Availability Zone. */ public void setDefaultForAz(Boolean defaultForAz) { this.defaultForAz = defaultForAz; } /** *

* Indicates whether this is the default subnet for the Availability Zone. *

* * @return Indicates whether this is the default subnet for the Availability Zone. */ public Boolean getDefaultForAz() { return this.defaultForAz; } /** *

* Indicates whether this is the default subnet for the Availability Zone. *

* * @param defaultForAz * Indicates whether this is the default subnet for the Availability Zone. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withDefaultForAz(Boolean defaultForAz) { setDefaultForAz(defaultForAz); return this; } /** *

* Indicates whether this is the default subnet for the Availability Zone. *

* * @return Indicates whether this is the default subnet for the Availability Zone. */ public Boolean isDefaultForAz() { return this.defaultForAz; } /** *

* Indicates the device position for local network interfaces in this subnet. For example, 1 indicates * local network interfaces in this subnet are the secondary network interface (eth1). *

* * @param enableLniAtDeviceIndex * Indicates the device position for local network interfaces in this subnet. For example, 1 * indicates local network interfaces in this subnet are the secondary network interface (eth1). */ public void setEnableLniAtDeviceIndex(Integer enableLniAtDeviceIndex) { this.enableLniAtDeviceIndex = enableLniAtDeviceIndex; } /** *

* Indicates the device position for local network interfaces in this subnet. For example, 1 indicates * local network interfaces in this subnet are the secondary network interface (eth1). *

* * @return Indicates the device position for local network interfaces in this subnet. For example, 1 * indicates local network interfaces in this subnet are the secondary network interface (eth1). */ public Integer getEnableLniAtDeviceIndex() { return this.enableLniAtDeviceIndex; } /** *

* Indicates the device position for local network interfaces in this subnet. For example, 1 indicates * local network interfaces in this subnet are the secondary network interface (eth1). *

* * @param enableLniAtDeviceIndex * Indicates the device position for local network interfaces in this subnet. For example, 1 * indicates local network interfaces in this subnet are the secondary network interface (eth1). * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withEnableLniAtDeviceIndex(Integer enableLniAtDeviceIndex) { setEnableLniAtDeviceIndex(enableLniAtDeviceIndex); return this; } /** *

* Indicates whether instances launched in this subnet receive a public IPv4 address. *

*

* Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with * running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the * Amazon VPC pricing page. *

* * @param mapPublicIpOnLaunch * Indicates whether instances launched in this subnet receive a public IPv4 address.

*

* Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with * running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab * on the Amazon VPC pricing page. */ public void setMapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch) { this.mapPublicIpOnLaunch = mapPublicIpOnLaunch; } /** *

* Indicates whether instances launched in this subnet receive a public IPv4 address. *

*

* Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with * running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the * Amazon VPC pricing page. *

* * @return Indicates whether instances launched in this subnet receive a public IPv4 address.

*

* Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated * with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address * tab on the Amazon VPC pricing page. */ public Boolean getMapPublicIpOnLaunch() { return this.mapPublicIpOnLaunch; } /** *

* Indicates whether instances launched in this subnet receive a public IPv4 address. *

*

* Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with * running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the * Amazon VPC pricing page. *

* * @param mapPublicIpOnLaunch * Indicates whether instances launched in this subnet receive a public IPv4 address.

*

* Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with * running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab * on the Amazon VPC pricing page. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withMapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch) { setMapPublicIpOnLaunch(mapPublicIpOnLaunch); return this; } /** *

* Indicates whether instances launched in this subnet receive a public IPv4 address. *

*

* Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with * running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the * Amazon VPC pricing page. *

* * @return Indicates whether instances launched in this subnet receive a public IPv4 address.

*

* Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated * with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address * tab on the Amazon VPC pricing page. */ public Boolean isMapPublicIpOnLaunch() { return this.mapPublicIpOnLaunch; } /** *

* Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives a customer-owned IPv4 address. *

* * @param mapCustomerOwnedIpOnLaunch * Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives a customer-owned IPv4 address. */ public void setMapCustomerOwnedIpOnLaunch(Boolean mapCustomerOwnedIpOnLaunch) { this.mapCustomerOwnedIpOnLaunch = mapCustomerOwnedIpOnLaunch; } /** *

* Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives a customer-owned IPv4 address. *

* * @return Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives a customer-owned IPv4 address. */ public Boolean getMapCustomerOwnedIpOnLaunch() { return this.mapCustomerOwnedIpOnLaunch; } /** *

* Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives a customer-owned IPv4 address. *

* * @param mapCustomerOwnedIpOnLaunch * Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives a customer-owned IPv4 address. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withMapCustomerOwnedIpOnLaunch(Boolean mapCustomerOwnedIpOnLaunch) { setMapCustomerOwnedIpOnLaunch(mapCustomerOwnedIpOnLaunch); return this; } /** *

* Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives a customer-owned IPv4 address. *

* * @return Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives a customer-owned IPv4 address. */ public Boolean isMapCustomerOwnedIpOnLaunch() { return this.mapCustomerOwnedIpOnLaunch; } /** *

* The customer-owned IPv4 address pool associated with the subnet. *

* * @param customerOwnedIpv4Pool * The customer-owned IPv4 address pool associated with the subnet. */ public void setCustomerOwnedIpv4Pool(String customerOwnedIpv4Pool) { this.customerOwnedIpv4Pool = customerOwnedIpv4Pool; } /** *

* The customer-owned IPv4 address pool associated with the subnet. *

* * @return The customer-owned IPv4 address pool associated with the subnet. */ public String getCustomerOwnedIpv4Pool() { return this.customerOwnedIpv4Pool; } /** *

* The customer-owned IPv4 address pool associated with the subnet. *

* * @param customerOwnedIpv4Pool * The customer-owned IPv4 address pool associated with the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withCustomerOwnedIpv4Pool(String customerOwnedIpv4Pool) { setCustomerOwnedIpv4Pool(customerOwnedIpv4Pool); return this; } /** *

* The current state of the subnet. *

* * @param state * The current state of the subnet. * @see SubnetState */ public void setState(String state) { this.state = state; } /** *

* The current state of the subnet. *

* * @return The current state of the subnet. * @see SubnetState */ public String getState() { return this.state; } /** *

* The current state of the subnet. *

* * @param state * The current state of the subnet. * @return Returns a reference to this object so that method calls can be chained together. * @see SubnetState */ public Subnet withState(String state) { setState(state); return this; } /** *

* The current state of the subnet. *

* * @param state * The current state of the subnet. * @see SubnetState */ public void setState(SubnetState state) { withState(state); } /** *

* The current state of the subnet. *

* * @param state * The current state of the subnet. * @return Returns a reference to this object so that method calls can be chained together. * @see SubnetState */ public Subnet withState(SubnetState state) { this.state = state.toString(); return this; } /** *

* The ID of the subnet. *

* * @param subnetId * The ID of the subnet. */ public void setSubnetId(String subnetId) { this.subnetId = subnetId; } /** *

* The ID of the subnet. *

* * @return The ID of the subnet. */ public String getSubnetId() { return this.subnetId; } /** *

* The ID of the subnet. *

* * @param subnetId * The ID of the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withSubnetId(String subnetId) { setSubnetId(subnetId); return this; } /** *

* The ID of the VPC the subnet is in. *

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

* The ID of the VPC the subnet is in. *

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

* The ID of the VPC the subnet is in. *

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

* The ID of the Amazon Web Services account that owns the subnet. *

* * @param ownerId * The ID of the Amazon Web Services account that owns the subnet. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** *

* The ID of the Amazon Web Services account that owns the subnet. *

* * @return The ID of the Amazon Web Services account that owns the subnet. */ public String getOwnerId() { return this.ownerId; } /** *

* The ID of the Amazon Web Services account that owns the subnet. *

* * @param ownerId * The ID of the Amazon Web Services account that owns the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** *

* Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives an IPv6 address. *

* * @param assignIpv6AddressOnCreation * Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives an IPv6 address. */ public void setAssignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation) { this.assignIpv6AddressOnCreation = assignIpv6AddressOnCreation; } /** *

* Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives an IPv6 address. *

* * @return Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives an IPv6 address. */ public Boolean getAssignIpv6AddressOnCreation() { return this.assignIpv6AddressOnCreation; } /** *

* Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives an IPv6 address. *

* * @param assignIpv6AddressOnCreation * Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives an IPv6 address. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withAssignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation) { setAssignIpv6AddressOnCreation(assignIpv6AddressOnCreation); return this; } /** *

* Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives an IPv6 address. *

* * @return Indicates whether a network interface created in this subnet (including a network interface created by * RunInstances) receives an IPv6 address. */ public Boolean isAssignIpv6AddressOnCreation() { return this.assignIpv6AddressOnCreation; } /** *

* Information about the IPv6 CIDR blocks associated with the subnet. *

* * @return Information about the IPv6 CIDR blocks associated with the subnet. */ public java.util.List getIpv6CidrBlockAssociationSet() { if (ipv6CidrBlockAssociationSet == null) { ipv6CidrBlockAssociationSet = new com.amazonaws.internal.SdkInternalList(); } return ipv6CidrBlockAssociationSet; } /** *

* Information about the IPv6 CIDR blocks associated with the subnet. *

* * @param ipv6CidrBlockAssociationSet * Information about the IPv6 CIDR blocks associated with the subnet. */ public void setIpv6CidrBlockAssociationSet(java.util.Collection ipv6CidrBlockAssociationSet) { if (ipv6CidrBlockAssociationSet == null) { this.ipv6CidrBlockAssociationSet = null; return; } this.ipv6CidrBlockAssociationSet = new com.amazonaws.internal.SdkInternalList(ipv6CidrBlockAssociationSet); } /** *

* Information about the IPv6 CIDR blocks associated with the subnet. *

*

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

* * @param ipv6CidrBlockAssociationSet * Information about the IPv6 CIDR blocks associated with the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withIpv6CidrBlockAssociationSet(SubnetIpv6CidrBlockAssociation... ipv6CidrBlockAssociationSet) { if (this.ipv6CidrBlockAssociationSet == null) { setIpv6CidrBlockAssociationSet(new com.amazonaws.internal.SdkInternalList(ipv6CidrBlockAssociationSet.length)); } for (SubnetIpv6CidrBlockAssociation ele : ipv6CidrBlockAssociationSet) { this.ipv6CidrBlockAssociationSet.add(ele); } return this; } /** *

* Information about the IPv6 CIDR blocks associated with the subnet. *

* * @param ipv6CidrBlockAssociationSet * Information about the IPv6 CIDR blocks associated with the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withIpv6CidrBlockAssociationSet(java.util.Collection ipv6CidrBlockAssociationSet) { setIpv6CidrBlockAssociationSet(ipv6CidrBlockAssociationSet); return this; } /** *

* Any tags assigned to the subnet. *

* * @return Any tags assigned to the subnet. */ public java.util.List getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* Any tags assigned to the subnet. *

* * @param tags * Any tags assigned to the subnet. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* Any tags assigned to the subnet. *

*

* 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 * Any tags assigned to the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet 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; } /** *

* Any tags assigned to the subnet. *

* * @param tags * Any tags assigned to the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withTags(java.util.Collection tags) { setTags(tags); return this; } /** *

* The Amazon Resource Name (ARN) of the subnet. *

* * @param subnetArn * The Amazon Resource Name (ARN) of the subnet. */ public void setSubnetArn(String subnetArn) { this.subnetArn = subnetArn; } /** *

* The Amazon Resource Name (ARN) of the subnet. *

* * @return The Amazon Resource Name (ARN) of the subnet. */ public String getSubnetArn() { return this.subnetArn; } /** *

* The Amazon Resource Name (ARN) of the subnet. *

* * @param subnetArn * The Amazon Resource Name (ARN) of the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withSubnetArn(String subnetArn) { setSubnetArn(subnetArn); return this; } /** *

* The Amazon Resource Name (ARN) of the Outpost. *

* * @param outpostArn * The Amazon Resource Name (ARN) of the Outpost. */ public void setOutpostArn(String outpostArn) { this.outpostArn = outpostArn; } /** *

* The Amazon Resource Name (ARN) of the Outpost. *

* * @return The Amazon Resource Name (ARN) of the Outpost. */ public String getOutpostArn() { return this.outpostArn; } /** *

* The Amazon Resource Name (ARN) of the Outpost. *

* * @param outpostArn * The Amazon Resource Name (ARN) of the Outpost. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withOutpostArn(String outpostArn) { setOutpostArn(outpostArn); return this; } /** *

* Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic * IPv6 addresses for IPv4-only destinations. *

* * @param enableDns64 * Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return * synthetic IPv6 addresses for IPv4-only destinations. */ public void setEnableDns64(Boolean enableDns64) { this.enableDns64 = enableDns64; } /** *

* Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic * IPv6 addresses for IPv4-only destinations. *

* * @return Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return * synthetic IPv6 addresses for IPv4-only destinations. */ public Boolean getEnableDns64() { return this.enableDns64; } /** *

* Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic * IPv6 addresses for IPv4-only destinations. *

* * @param enableDns64 * Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return * synthetic IPv6 addresses for IPv4-only destinations. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withEnableDns64(Boolean enableDns64) { setEnableDns64(enableDns64); return this; } /** *

* Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic * IPv6 addresses for IPv4-only destinations. *

* * @return Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return * synthetic IPv6 addresses for IPv4-only destinations. */ public Boolean isEnableDns64() { return this.enableDns64; } /** *

* Indicates whether this is an IPv6 only subnet. *

* * @param ipv6Native * Indicates whether this is an IPv6 only subnet. */ public void setIpv6Native(Boolean ipv6Native) { this.ipv6Native = ipv6Native; } /** *

* Indicates whether this is an IPv6 only subnet. *

* * @return Indicates whether this is an IPv6 only subnet. */ public Boolean getIpv6Native() { return this.ipv6Native; } /** *

* Indicates whether this is an IPv6 only subnet. *

* * @param ipv6Native * Indicates whether this is an IPv6 only subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withIpv6Native(Boolean ipv6Native) { setIpv6Native(ipv6Native); return this; } /** *

* Indicates whether this is an IPv6 only subnet. *

* * @return Indicates whether this is an IPv6 only subnet. */ public Boolean isIpv6Native() { return this.ipv6Native; } /** *

* The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 * address or ID of the instance. *

* * @param privateDnsNameOptionsOnLaunch * The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the * IPv4 address or ID of the instance. */ public void setPrivateDnsNameOptionsOnLaunch(PrivateDnsNameOptionsOnLaunch privateDnsNameOptionsOnLaunch) { this.privateDnsNameOptionsOnLaunch = privateDnsNameOptionsOnLaunch; } /** *

* The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 * address or ID of the instance. *

* * @return The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on * the IPv4 address or ID of the instance. */ public PrivateDnsNameOptionsOnLaunch getPrivateDnsNameOptionsOnLaunch() { return this.privateDnsNameOptionsOnLaunch; } /** *

* The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 * address or ID of the instance. *

* * @param privateDnsNameOptionsOnLaunch * The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the * IPv4 address or ID of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withPrivateDnsNameOptionsOnLaunch(PrivateDnsNameOptionsOnLaunch privateDnsNameOptionsOnLaunch) { setPrivateDnsNameOptionsOnLaunch(privateDnsNameOptionsOnLaunch); 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 (getAvailabilityZone() != null) sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(","); if (getAvailabilityZoneId() != null) sb.append("AvailabilityZoneId: ").append(getAvailabilityZoneId()).append(","); if (getAvailableIpAddressCount() != null) sb.append("AvailableIpAddressCount: ").append(getAvailableIpAddressCount()).append(","); if (getCidrBlock() != null) sb.append("CidrBlock: ").append(getCidrBlock()).append(","); if (getDefaultForAz() != null) sb.append("DefaultForAz: ").append(getDefaultForAz()).append(","); if (getEnableLniAtDeviceIndex() != null) sb.append("EnableLniAtDeviceIndex: ").append(getEnableLniAtDeviceIndex()).append(","); if (getMapPublicIpOnLaunch() != null) sb.append("MapPublicIpOnLaunch: ").append(getMapPublicIpOnLaunch()).append(","); if (getMapCustomerOwnedIpOnLaunch() != null) sb.append("MapCustomerOwnedIpOnLaunch: ").append(getMapCustomerOwnedIpOnLaunch()).append(","); if (getCustomerOwnedIpv4Pool() != null) sb.append("CustomerOwnedIpv4Pool: ").append(getCustomerOwnedIpv4Pool()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getSubnetId() != null) sb.append("SubnetId: ").append(getSubnetId()).append(","); if (getVpcId() != null) sb.append("VpcId: ").append(getVpcId()).append(","); if (getOwnerId() != null) sb.append("OwnerId: ").append(getOwnerId()).append(","); if (getAssignIpv6AddressOnCreation() != null) sb.append("AssignIpv6AddressOnCreation: ").append(getAssignIpv6AddressOnCreation()).append(","); if (getIpv6CidrBlockAssociationSet() != null) sb.append("Ipv6CidrBlockAssociationSet: ").append(getIpv6CidrBlockAssociationSet()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getSubnetArn() != null) sb.append("SubnetArn: ").append(getSubnetArn()).append(","); if (getOutpostArn() != null) sb.append("OutpostArn: ").append(getOutpostArn()).append(","); if (getEnableDns64() != null) sb.append("EnableDns64: ").append(getEnableDns64()).append(","); if (getIpv6Native() != null) sb.append("Ipv6Native: ").append(getIpv6Native()).append(","); if (getPrivateDnsNameOptionsOnLaunch() != null) sb.append("PrivateDnsNameOptionsOnLaunch: ").append(getPrivateDnsNameOptionsOnLaunch()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Subnet == false) return false; Subnet other = (Subnet) obj; 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.getAvailableIpAddressCount() == null ^ this.getAvailableIpAddressCount() == null) return false; if (other.getAvailableIpAddressCount() != null && other.getAvailableIpAddressCount().equals(this.getAvailableIpAddressCount()) == 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.getDefaultForAz() == null ^ this.getDefaultForAz() == null) return false; if (other.getDefaultForAz() != null && other.getDefaultForAz().equals(this.getDefaultForAz()) == false) return false; if (other.getEnableLniAtDeviceIndex() == null ^ this.getEnableLniAtDeviceIndex() == null) return false; if (other.getEnableLniAtDeviceIndex() != null && other.getEnableLniAtDeviceIndex().equals(this.getEnableLniAtDeviceIndex()) == false) return false; if (other.getMapPublicIpOnLaunch() == null ^ this.getMapPublicIpOnLaunch() == null) return false; if (other.getMapPublicIpOnLaunch() != null && other.getMapPublicIpOnLaunch().equals(this.getMapPublicIpOnLaunch()) == false) return false; if (other.getMapCustomerOwnedIpOnLaunch() == null ^ this.getMapCustomerOwnedIpOnLaunch() == null) return false; if (other.getMapCustomerOwnedIpOnLaunch() != null && other.getMapCustomerOwnedIpOnLaunch().equals(this.getMapCustomerOwnedIpOnLaunch()) == false) return false; if (other.getCustomerOwnedIpv4Pool() == null ^ this.getCustomerOwnedIpv4Pool() == null) return false; if (other.getCustomerOwnedIpv4Pool() != null && other.getCustomerOwnedIpv4Pool().equals(this.getCustomerOwnedIpv4Pool()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getSubnetId() == null ^ this.getSubnetId() == null) return false; if (other.getSubnetId() != null && other.getSubnetId().equals(this.getSubnetId()) == 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.getOwnerId() == null ^ this.getOwnerId() == null) return false; if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == false) return false; if (other.getAssignIpv6AddressOnCreation() == null ^ this.getAssignIpv6AddressOnCreation() == null) return false; if (other.getAssignIpv6AddressOnCreation() != null && other.getAssignIpv6AddressOnCreation().equals(this.getAssignIpv6AddressOnCreation()) == false) return false; if (other.getIpv6CidrBlockAssociationSet() == null ^ this.getIpv6CidrBlockAssociationSet() == null) return false; if (other.getIpv6CidrBlockAssociationSet() != null && other.getIpv6CidrBlockAssociationSet().equals(this.getIpv6CidrBlockAssociationSet()) == 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.getSubnetArn() == null ^ this.getSubnetArn() == null) return false; if (other.getSubnetArn() != null && other.getSubnetArn().equals(this.getSubnetArn()) == 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.getEnableDns64() == null ^ this.getEnableDns64() == null) return false; if (other.getEnableDns64() != null && other.getEnableDns64().equals(this.getEnableDns64()) == 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.getPrivateDnsNameOptionsOnLaunch() == null ^ this.getPrivateDnsNameOptionsOnLaunch() == null) return false; if (other.getPrivateDnsNameOptionsOnLaunch() != null && other.getPrivateDnsNameOptionsOnLaunch().equals(this.getPrivateDnsNameOptionsOnLaunch()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZoneId() == null) ? 0 : getAvailabilityZoneId().hashCode()); hashCode = prime * hashCode + ((getAvailableIpAddressCount() == null) ? 0 : getAvailableIpAddressCount().hashCode()); hashCode = prime * hashCode + ((getCidrBlock() == null) ? 0 : getCidrBlock().hashCode()); hashCode = prime * hashCode + ((getDefaultForAz() == null) ? 0 : getDefaultForAz().hashCode()); hashCode = prime * hashCode + ((getEnableLniAtDeviceIndex() == null) ? 0 : getEnableLniAtDeviceIndex().hashCode()); hashCode = prime * hashCode + ((getMapPublicIpOnLaunch() == null) ? 0 : getMapPublicIpOnLaunch().hashCode()); hashCode = prime * hashCode + ((getMapCustomerOwnedIpOnLaunch() == null) ? 0 : getMapCustomerOwnedIpOnLaunch().hashCode()); hashCode = prime * hashCode + ((getCustomerOwnedIpv4Pool() == null) ? 0 : getCustomerOwnedIpv4Pool().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode()); hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getAssignIpv6AddressOnCreation() == null) ? 0 : getAssignIpv6AddressOnCreation().hashCode()); hashCode = prime * hashCode + ((getIpv6CidrBlockAssociationSet() == null) ? 0 : getIpv6CidrBlockAssociationSet().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getSubnetArn() == null) ? 0 : getSubnetArn().hashCode()); hashCode = prime * hashCode + ((getOutpostArn() == null) ? 0 : getOutpostArn().hashCode()); hashCode = prime * hashCode + ((getEnableDns64() == null) ? 0 : getEnableDns64().hashCode()); hashCode = prime * hashCode + ((getIpv6Native() == null) ? 0 : getIpv6Native().hashCode()); hashCode = prime * hashCode + ((getPrivateDnsNameOptionsOnLaunch() == null) ? 0 : getPrivateDnsNameOptionsOnLaunch().hashCode()); return hashCode; } @Override public Subnet clone() { try { return (Subnet) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy