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

software.amazon.awssdk.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

The newest version!
/*
 * Copyright 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 software.amazon.awssdk.services.ec2.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Describes a subnet. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Subnet implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField AVAILABILITY_ZONE_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("AvailabilityZoneId") .getter(getter(Subnet::availabilityZoneId)) .setter(setter(Builder::availabilityZoneId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AvailabilityZoneId") .unmarshallLocationName("availabilityZoneId").build()).build(); private static final SdkField ENABLE_LNI_AT_DEVICE_INDEX_FIELD = SdkField . builder(MarshallingType.INTEGER) .memberName("EnableLniAtDeviceIndex") .getter(getter(Subnet::enableLniAtDeviceIndex)) .setter(setter(Builder::enableLniAtDeviceIndex)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnableLniAtDeviceIndex") .unmarshallLocationName("enableLniAtDeviceIndex").build()).build(); private static final SdkField MAP_CUSTOMER_OWNED_IP_ON_LAUNCH_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .memberName("MapCustomerOwnedIpOnLaunch") .getter(getter(Subnet::mapCustomerOwnedIpOnLaunch)) .setter(setter(Builder::mapCustomerOwnedIpOnLaunch)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MapCustomerOwnedIpOnLaunch") .unmarshallLocationName("mapCustomerOwnedIpOnLaunch").build()).build(); private static final SdkField CUSTOMER_OWNED_IPV4_POOL_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("CustomerOwnedIpv4Pool") .getter(getter(Subnet::customerOwnedIpv4Pool)) .setter(setter(Builder::customerOwnedIpv4Pool)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CustomerOwnedIpv4Pool") .unmarshallLocationName("customerOwnedIpv4Pool").build()).build(); private static final SdkField OWNER_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("OwnerId") .getter(getter(Subnet::ownerId)) .setter(setter(Builder::ownerId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OwnerId") .unmarshallLocationName("ownerId").build()).build(); private static final SdkField ASSIGN_IPV6_ADDRESS_ON_CREATION_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .memberName("AssignIpv6AddressOnCreation") .getter(getter(Subnet::assignIpv6AddressOnCreation)) .setter(setter(Builder::assignIpv6AddressOnCreation)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AssignIpv6AddressOnCreation") .unmarshallLocationName("assignIpv6AddressOnCreation").build()).build(); private static final SdkField> IPV6_CIDR_BLOCK_ASSOCIATION_SET_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Ipv6CidrBlockAssociationSet") .getter(getter(Subnet::ipv6CidrBlockAssociationSet)) .setter(setter(Builder::ipv6CidrBlockAssociationSet)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Ipv6CidrBlockAssociationSet") .unmarshallLocationName("ipv6CidrBlockAssociationSet").build(), ListTrait .builder() .memberLocationName("item") .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(SubnetIpv6CidrBlockAssociation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("Item").unmarshallLocationName("item").build()).build()) .build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Tags") .getter(getter(Subnet::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TagSet") .unmarshallLocationName("tagSet").build(), ListTrait .builder() .memberLocationName("item") .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Tag::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("Item").unmarshallLocationName("item").build()).build()) .build()).build(); private static final SdkField SUBNET_ARN_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("SubnetArn") .getter(getter(Subnet::subnetArn)) .setter(setter(Builder::subnetArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SubnetArn") .unmarshallLocationName("subnetArn").build()).build(); private static final SdkField OUTPOST_ARN_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("OutpostArn") .getter(getter(Subnet::outpostArn)) .setter(setter(Builder::outpostArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutpostArn") .unmarshallLocationName("outpostArn").build()).build(); private static final SdkField ENABLE_DNS64_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .memberName("EnableDns64") .getter(getter(Subnet::enableDns64)) .setter(setter(Builder::enableDns64)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnableDns64") .unmarshallLocationName("enableDns64").build()).build(); private static final SdkField IPV6_NATIVE_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .memberName("Ipv6Native") .getter(getter(Subnet::ipv6Native)) .setter(setter(Builder::ipv6Native)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Ipv6Native") .unmarshallLocationName("ipv6Native").build()).build(); private static final SdkField PRIVATE_DNS_NAME_OPTIONS_ON_LAUNCH_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("PrivateDnsNameOptionsOnLaunch") .getter(getter(Subnet::privateDnsNameOptionsOnLaunch)) .setter(setter(Builder::privateDnsNameOptionsOnLaunch)) .constructor(PrivateDnsNameOptionsOnLaunch::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PrivateDnsNameOptionsOnLaunch") .unmarshallLocationName("privateDnsNameOptionsOnLaunch").build()).build(); private static final SdkField SUBNET_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("SubnetId") .getter(getter(Subnet::subnetId)) .setter(setter(Builder::subnetId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SubnetId") .unmarshallLocationName("subnetId").build()).build(); private static final SdkField STATE_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("State") .getter(getter(Subnet::stateAsString)) .setter(setter(Builder::state)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("State") .unmarshallLocationName("state").build()).build(); private static final SdkField VPC_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("VpcId") .getter(getter(Subnet::vpcId)) .setter(setter(Builder::vpcId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcId") .unmarshallLocationName("vpcId").build()).build(); private static final SdkField CIDR_BLOCK_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("CidrBlock") .getter(getter(Subnet::cidrBlock)) .setter(setter(Builder::cidrBlock)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CidrBlock") .unmarshallLocationName("cidrBlock").build()).build(); private static final SdkField AVAILABLE_IP_ADDRESS_COUNT_FIELD = SdkField . builder(MarshallingType.INTEGER) .memberName("AvailableIpAddressCount") .getter(getter(Subnet::availableIpAddressCount)) .setter(setter(Builder::availableIpAddressCount)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AvailableIpAddressCount") .unmarshallLocationName("availableIpAddressCount").build()).build(); private static final SdkField AVAILABILITY_ZONE_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("AvailabilityZone") .getter(getter(Subnet::availabilityZone)) .setter(setter(Builder::availabilityZone)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AvailabilityZone") .unmarshallLocationName("availabilityZone").build()).build(); private static final SdkField DEFAULT_FOR_AZ_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .memberName("DefaultForAz") .getter(getter(Subnet::defaultForAz)) .setter(setter(Builder::defaultForAz)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DefaultForAz") .unmarshallLocationName("defaultForAz").build()).build(); private static final SdkField MAP_PUBLIC_IP_ON_LAUNCH_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .memberName("MapPublicIpOnLaunch") .getter(getter(Subnet::mapPublicIpOnLaunch)) .setter(setter(Builder::mapPublicIpOnLaunch)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MapPublicIpOnLaunch") .unmarshallLocationName("mapPublicIpOnLaunch").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(AVAILABILITY_ZONE_ID_FIELD, ENABLE_LNI_AT_DEVICE_INDEX_FIELD, MAP_CUSTOMER_OWNED_IP_ON_LAUNCH_FIELD, CUSTOMER_OWNED_IPV4_POOL_FIELD, OWNER_ID_FIELD, ASSIGN_IPV6_ADDRESS_ON_CREATION_FIELD, IPV6_CIDR_BLOCK_ASSOCIATION_SET_FIELD, TAGS_FIELD, SUBNET_ARN_FIELD, OUTPOST_ARN_FIELD, ENABLE_DNS64_FIELD, IPV6_NATIVE_FIELD, PRIVATE_DNS_NAME_OPTIONS_ON_LAUNCH_FIELD, SUBNET_ID_FIELD, STATE_FIELD, VPC_ID_FIELD, CIDR_BLOCK_FIELD, AVAILABLE_IP_ADDRESS_COUNT_FIELD, AVAILABILITY_ZONE_FIELD, DEFAULT_FOR_AZ_FIELD, MAP_PUBLIC_IP_ON_LAUNCH_FIELD)); private static final Map> SDK_NAME_TO_FIELD = Collections .unmodifiableMap(new HashMap>() { { put("AvailabilityZoneId", AVAILABILITY_ZONE_ID_FIELD); put("EnableLniAtDeviceIndex", ENABLE_LNI_AT_DEVICE_INDEX_FIELD); put("MapCustomerOwnedIpOnLaunch", MAP_CUSTOMER_OWNED_IP_ON_LAUNCH_FIELD); put("CustomerOwnedIpv4Pool", CUSTOMER_OWNED_IPV4_POOL_FIELD); put("OwnerId", OWNER_ID_FIELD); put("AssignIpv6AddressOnCreation", ASSIGN_IPV6_ADDRESS_ON_CREATION_FIELD); put("Ipv6CidrBlockAssociationSet", IPV6_CIDR_BLOCK_ASSOCIATION_SET_FIELD); put("TagSet", TAGS_FIELD); put("SubnetArn", SUBNET_ARN_FIELD); put("OutpostArn", OUTPOST_ARN_FIELD); put("EnableDns64", ENABLE_DNS64_FIELD); put("Ipv6Native", IPV6_NATIVE_FIELD); put("PrivateDnsNameOptionsOnLaunch", PRIVATE_DNS_NAME_OPTIONS_ON_LAUNCH_FIELD); put("SubnetId", SUBNET_ID_FIELD); put("State", STATE_FIELD); put("VpcId", VPC_ID_FIELD); put("CidrBlock", CIDR_BLOCK_FIELD); put("AvailableIpAddressCount", AVAILABLE_IP_ADDRESS_COUNT_FIELD); put("AvailabilityZone", AVAILABILITY_ZONE_FIELD); put("DefaultForAz", DEFAULT_FOR_AZ_FIELD); put("MapPublicIpOnLaunch", MAP_PUBLIC_IP_ON_LAUNCH_FIELD); } }); private static final long serialVersionUID = 1L; private final String availabilityZoneId; private final Integer enableLniAtDeviceIndex; private final Boolean mapCustomerOwnedIpOnLaunch; private final String customerOwnedIpv4Pool; private final String ownerId; private final Boolean assignIpv6AddressOnCreation; private final List ipv6CidrBlockAssociationSet; private final List tags; private final String subnetArn; private final String outpostArn; private final Boolean enableDns64; private final Boolean ipv6Native; private final PrivateDnsNameOptionsOnLaunch privateDnsNameOptionsOnLaunch; private final String subnetId; private final String state; private final String vpcId; private final String cidrBlock; private final Integer availableIpAddressCount; private final String availabilityZone; private final Boolean defaultForAz; private final Boolean mapPublicIpOnLaunch; private Subnet(BuilderImpl builder) { this.availabilityZoneId = builder.availabilityZoneId; this.enableLniAtDeviceIndex = builder.enableLniAtDeviceIndex; this.mapCustomerOwnedIpOnLaunch = builder.mapCustomerOwnedIpOnLaunch; this.customerOwnedIpv4Pool = builder.customerOwnedIpv4Pool; this.ownerId = builder.ownerId; this.assignIpv6AddressOnCreation = builder.assignIpv6AddressOnCreation; this.ipv6CidrBlockAssociationSet = builder.ipv6CidrBlockAssociationSet; this.tags = builder.tags; this.subnetArn = builder.subnetArn; this.outpostArn = builder.outpostArn; this.enableDns64 = builder.enableDns64; this.ipv6Native = builder.ipv6Native; this.privateDnsNameOptionsOnLaunch = builder.privateDnsNameOptionsOnLaunch; this.subnetId = builder.subnetId; this.state = builder.state; this.vpcId = builder.vpcId; this.cidrBlock = builder.cidrBlock; this.availableIpAddressCount = builder.availableIpAddressCount; this.availabilityZone = builder.availabilityZone; this.defaultForAz = builder.defaultForAz; this.mapPublicIpOnLaunch = builder.mapPublicIpOnLaunch; } /** *

* The AZ ID of the subnet. *

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

* 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 final Integer enableLniAtDeviceIndex() { return enableLniAtDeviceIndex; } /** *

* 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 final Boolean mapCustomerOwnedIpOnLaunch() { return mapCustomerOwnedIpOnLaunch; } /** *

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

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

* 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 final String ownerId() { return ownerId; } /** *

* 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 final Boolean assignIpv6AddressOnCreation() { return assignIpv6AddressOnCreation; } /** * For responses, this returns true if the service returned a value for the Ipv6CidrBlockAssociationSet property. * This DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the * property). This is useful because the SDK will never return a null collection or map, but you may need to * differentiate between the service returning nothing (or null) and the service returning an empty collection or * map. For requests, this returns true if a value for the property was specified in the request builder, and false * if a value was not specified. */ public final boolean hasIpv6CidrBlockAssociationSet() { return ipv6CidrBlockAssociationSet != null && !(ipv6CidrBlockAssociationSet instanceof SdkAutoConstructList); } /** *

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

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasIpv6CidrBlockAssociationSet} method. *

* * @return Information about the IPv6 CIDR blocks associated with the subnet. */ public final List ipv6CidrBlockAssociationSet() { return ipv6CidrBlockAssociationSet; } /** * For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

* Any tags assigned to the subnet. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasTags} method. *

* * @return Any tags assigned to the subnet. */ public final List tags() { return tags; } /** *

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

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

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

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

* 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 final Boolean enableDns64() { return enableDns64; } /** *

* Indicates whether this is an IPv6 only subnet. *

* * @return Indicates whether this is an IPv6 only subnet. */ public final Boolean ipv6Native() { return 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. *

* * @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 final PrivateDnsNameOptionsOnLaunch privateDnsNameOptionsOnLaunch() { return privateDnsNameOptionsOnLaunch; } /** *

* The ID of the subnet. *

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

* The current state of the subnet. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #state} will return * {@link SubnetState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #stateAsString}. *

* * @return The current state of the subnet. * @see SubnetState */ public final SubnetState state() { return SubnetState.fromValue(state); } /** *

* The current state of the subnet. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #state} will return * {@link SubnetState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #stateAsString}. *

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

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

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

* The IPv4 CIDR block assigned to the subnet. *

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

* 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 final Integer availableIpAddressCount() { return availableIpAddressCount; } /** *

* The Availability Zone of the subnet. *

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

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

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

* 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 final Boolean mapPublicIpOnLaunch() { return mapPublicIpOnLaunch; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(availabilityZoneId()); hashCode = 31 * hashCode + Objects.hashCode(enableLniAtDeviceIndex()); hashCode = 31 * hashCode + Objects.hashCode(mapCustomerOwnedIpOnLaunch()); hashCode = 31 * hashCode + Objects.hashCode(customerOwnedIpv4Pool()); hashCode = 31 * hashCode + Objects.hashCode(ownerId()); hashCode = 31 * hashCode + Objects.hashCode(assignIpv6AddressOnCreation()); hashCode = 31 * hashCode + Objects.hashCode(hasIpv6CidrBlockAssociationSet() ? ipv6CidrBlockAssociationSet() : null); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(subnetArn()); hashCode = 31 * hashCode + Objects.hashCode(outpostArn()); hashCode = 31 * hashCode + Objects.hashCode(enableDns64()); hashCode = 31 * hashCode + Objects.hashCode(ipv6Native()); hashCode = 31 * hashCode + Objects.hashCode(privateDnsNameOptionsOnLaunch()); hashCode = 31 * hashCode + Objects.hashCode(subnetId()); hashCode = 31 * hashCode + Objects.hashCode(stateAsString()); hashCode = 31 * hashCode + Objects.hashCode(vpcId()); hashCode = 31 * hashCode + Objects.hashCode(cidrBlock()); hashCode = 31 * hashCode + Objects.hashCode(availableIpAddressCount()); hashCode = 31 * hashCode + Objects.hashCode(availabilityZone()); hashCode = 31 * hashCode + Objects.hashCode(defaultForAz()); hashCode = 31 * hashCode + Objects.hashCode(mapPublicIpOnLaunch()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Subnet)) { return false; } Subnet other = (Subnet) obj; return Objects.equals(availabilityZoneId(), other.availabilityZoneId()) && Objects.equals(enableLniAtDeviceIndex(), other.enableLniAtDeviceIndex()) && Objects.equals(mapCustomerOwnedIpOnLaunch(), other.mapCustomerOwnedIpOnLaunch()) && Objects.equals(customerOwnedIpv4Pool(), other.customerOwnedIpv4Pool()) && Objects.equals(ownerId(), other.ownerId()) && Objects.equals(assignIpv6AddressOnCreation(), other.assignIpv6AddressOnCreation()) && hasIpv6CidrBlockAssociationSet() == other.hasIpv6CidrBlockAssociationSet() && Objects.equals(ipv6CidrBlockAssociationSet(), other.ipv6CidrBlockAssociationSet()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(subnetArn(), other.subnetArn()) && Objects.equals(outpostArn(), other.outpostArn()) && Objects.equals(enableDns64(), other.enableDns64()) && Objects.equals(ipv6Native(), other.ipv6Native()) && Objects.equals(privateDnsNameOptionsOnLaunch(), other.privateDnsNameOptionsOnLaunch()) && Objects.equals(subnetId(), other.subnetId()) && Objects.equals(stateAsString(), other.stateAsString()) && Objects.equals(vpcId(), other.vpcId()) && Objects.equals(cidrBlock(), other.cidrBlock()) && Objects.equals(availableIpAddressCount(), other.availableIpAddressCount()) && Objects.equals(availabilityZone(), other.availabilityZone()) && Objects.equals(defaultForAz(), other.defaultForAz()) && Objects.equals(mapPublicIpOnLaunch(), other.mapPublicIpOnLaunch()); } /** * 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. */ @Override public final String toString() { return ToString.builder("Subnet").add("AvailabilityZoneId", availabilityZoneId()) .add("EnableLniAtDeviceIndex", enableLniAtDeviceIndex()) .add("MapCustomerOwnedIpOnLaunch", mapCustomerOwnedIpOnLaunch()) .add("CustomerOwnedIpv4Pool", customerOwnedIpv4Pool()).add("OwnerId", ownerId()) .add("AssignIpv6AddressOnCreation", assignIpv6AddressOnCreation()) .add("Ipv6CidrBlockAssociationSet", hasIpv6CidrBlockAssociationSet() ? ipv6CidrBlockAssociationSet() : null) .add("Tags", hasTags() ? tags() : null).add("SubnetArn", subnetArn()).add("OutpostArn", outpostArn()) .add("EnableDns64", enableDns64()).add("Ipv6Native", ipv6Native()) .add("PrivateDnsNameOptionsOnLaunch", privateDnsNameOptionsOnLaunch()).add("SubnetId", subnetId()) .add("State", stateAsString()).add("VpcId", vpcId()).add("CidrBlock", cidrBlock()) .add("AvailableIpAddressCount", availableIpAddressCount()).add("AvailabilityZone", availabilityZone()) .add("DefaultForAz", defaultForAz()).add("MapPublicIpOnLaunch", mapPublicIpOnLaunch()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "AvailabilityZoneId": return Optional.ofNullable(clazz.cast(availabilityZoneId())); case "EnableLniAtDeviceIndex": return Optional.ofNullable(clazz.cast(enableLniAtDeviceIndex())); case "MapCustomerOwnedIpOnLaunch": return Optional.ofNullable(clazz.cast(mapCustomerOwnedIpOnLaunch())); case "CustomerOwnedIpv4Pool": return Optional.ofNullable(clazz.cast(customerOwnedIpv4Pool())); case "OwnerId": return Optional.ofNullable(clazz.cast(ownerId())); case "AssignIpv6AddressOnCreation": return Optional.ofNullable(clazz.cast(assignIpv6AddressOnCreation())); case "Ipv6CidrBlockAssociationSet": return Optional.ofNullable(clazz.cast(ipv6CidrBlockAssociationSet())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "SubnetArn": return Optional.ofNullable(clazz.cast(subnetArn())); case "OutpostArn": return Optional.ofNullable(clazz.cast(outpostArn())); case "EnableDns64": return Optional.ofNullable(clazz.cast(enableDns64())); case "Ipv6Native": return Optional.ofNullable(clazz.cast(ipv6Native())); case "PrivateDnsNameOptionsOnLaunch": return Optional.ofNullable(clazz.cast(privateDnsNameOptionsOnLaunch())); case "SubnetId": return Optional.ofNullable(clazz.cast(subnetId())); case "State": return Optional.ofNullable(clazz.cast(stateAsString())); case "VpcId": return Optional.ofNullable(clazz.cast(vpcId())); case "CidrBlock": return Optional.ofNullable(clazz.cast(cidrBlock())); case "AvailableIpAddressCount": return Optional.ofNullable(clazz.cast(availableIpAddressCount())); case "AvailabilityZone": return Optional.ofNullable(clazz.cast(availabilityZone())); case "DefaultForAz": return Optional.ofNullable(clazz.cast(defaultForAz())); case "MapPublicIpOnLaunch": return Optional.ofNullable(clazz.cast(mapPublicIpOnLaunch())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((Subnet) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* 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. */ Builder availabilityZoneId(String availabilityZoneId); /** *

* 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. */ Builder enableLniAtDeviceIndex(Integer enableLniAtDeviceIndex); /** *

* 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. */ Builder mapCustomerOwnedIpOnLaunch(Boolean mapCustomerOwnedIpOnLaunch); /** *

* 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. */ Builder customerOwnedIpv4Pool(String customerOwnedIpv4Pool); /** *

* 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. */ Builder ownerId(String ownerId); /** *

* 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. */ Builder assignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation); /** *

* 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. */ Builder ipv6CidrBlockAssociationSet(Collection ipv6CidrBlockAssociationSet); /** *

* 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. */ Builder ipv6CidrBlockAssociationSet(SubnetIpv6CidrBlockAssociation... ipv6CidrBlockAssociationSet); /** *

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

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.ec2.model.SubnetIpv6CidrBlockAssociation.Builder} avoiding the need to * create one manually via * {@link software.amazon.awssdk.services.ec2.model.SubnetIpv6CidrBlockAssociation#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.ec2.model.SubnetIpv6CidrBlockAssociation.Builder#build()} is called * immediately and its result is passed to {@link * #ipv6CidrBlockAssociationSet(List)}. * * @param ipv6CidrBlockAssociationSet * a consumer that will call methods on * {@link software.amazon.awssdk.services.ec2.model.SubnetIpv6CidrBlockAssociation.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #ipv6CidrBlockAssociationSet(java.util.Collection) */ Builder ipv6CidrBlockAssociationSet(Consumer... ipv6CidrBlockAssociationSet); /** *

* 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. */ Builder tags(Collection tags); /** *

* 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. */ Builder tags(Tag... tags); /** *

* Any tags assigned to the subnet. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.ec2.model.Tag.Builder} avoiding the need to create one manually via * {@link software.amazon.awssdk.services.ec2.model.Tag#builder()}. * *

* When the {@link Consumer} completes, {@link software.amazon.awssdk.services.ec2.model.Tag.Builder#build()} is * called immediately and its result is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on {@link software.amazon.awssdk.services.ec2.model.Tag.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(java.util.Collection) */ Builder tags(Consumer... tags); /** *

* 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. */ Builder subnetArn(String subnetArn); /** *

* 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. */ Builder outpostArn(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. *

* * @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. */ Builder enableDns64(Boolean enableDns64); /** *

* 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. */ Builder ipv6Native(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. *

* * @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. */ Builder privateDnsNameOptionsOnLaunch(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. *

* This is a convenience method that creates an instance of the {@link PrivateDnsNameOptionsOnLaunch.Builder} * avoiding the need to create one manually via {@link PrivateDnsNameOptionsOnLaunch#builder()}. * *

* When the {@link Consumer} completes, {@link PrivateDnsNameOptionsOnLaunch.Builder#build()} is called * immediately and its result is passed to {@link #privateDnsNameOptionsOnLaunch(PrivateDnsNameOptionsOnLaunch)}. * * @param privateDnsNameOptionsOnLaunch * a consumer that will call methods on {@link PrivateDnsNameOptionsOnLaunch.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #privateDnsNameOptionsOnLaunch(PrivateDnsNameOptionsOnLaunch) */ default Builder privateDnsNameOptionsOnLaunch( Consumer privateDnsNameOptionsOnLaunch) { return privateDnsNameOptionsOnLaunch(PrivateDnsNameOptionsOnLaunch.builder() .applyMutation(privateDnsNameOptionsOnLaunch).build()); } /** *

* 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. */ Builder subnetId(String subnetId); /** *

* The current state of the subnet. *

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

* The current state of the subnet. *

* * @param state * The current state of the subnet. * @see SubnetState * @return Returns a reference to this object so that method calls can be chained together. * @see SubnetState */ Builder state(SubnetState state); /** *

* 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. */ Builder vpcId(String vpcId); /** *

* 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. */ Builder cidrBlock(String cidrBlock); /** *

* 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. */ Builder availableIpAddressCount(Integer availableIpAddressCount); /** *

* 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. */ Builder availabilityZone(String availabilityZone); /** *

* 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. */ Builder defaultForAz(Boolean defaultForAz); /** *

* 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. */ Builder mapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch); } static final class BuilderImpl implements Builder { private String availabilityZoneId; private Integer enableLniAtDeviceIndex; private Boolean mapCustomerOwnedIpOnLaunch; private String customerOwnedIpv4Pool; private String ownerId; private Boolean assignIpv6AddressOnCreation; private List ipv6CidrBlockAssociationSet = DefaultSdkAutoConstructList.getInstance(); private List tags = DefaultSdkAutoConstructList.getInstance(); private String subnetArn; private String outpostArn; private Boolean enableDns64; private Boolean ipv6Native; private PrivateDnsNameOptionsOnLaunch privateDnsNameOptionsOnLaunch; private String subnetId; private String state; private String vpcId; private String cidrBlock; private Integer availableIpAddressCount; private String availabilityZone; private Boolean defaultForAz; private Boolean mapPublicIpOnLaunch; private BuilderImpl() { } private BuilderImpl(Subnet model) { availabilityZoneId(model.availabilityZoneId); enableLniAtDeviceIndex(model.enableLniAtDeviceIndex); mapCustomerOwnedIpOnLaunch(model.mapCustomerOwnedIpOnLaunch); customerOwnedIpv4Pool(model.customerOwnedIpv4Pool); ownerId(model.ownerId); assignIpv6AddressOnCreation(model.assignIpv6AddressOnCreation); ipv6CidrBlockAssociationSet(model.ipv6CidrBlockAssociationSet); tags(model.tags); subnetArn(model.subnetArn); outpostArn(model.outpostArn); enableDns64(model.enableDns64); ipv6Native(model.ipv6Native); privateDnsNameOptionsOnLaunch(model.privateDnsNameOptionsOnLaunch); subnetId(model.subnetId); state(model.state); vpcId(model.vpcId); cidrBlock(model.cidrBlock); availableIpAddressCount(model.availableIpAddressCount); availabilityZone(model.availabilityZone); defaultForAz(model.defaultForAz); mapPublicIpOnLaunch(model.mapPublicIpOnLaunch); } public final String getAvailabilityZoneId() { return availabilityZoneId; } public final void setAvailabilityZoneId(String availabilityZoneId) { this.availabilityZoneId = availabilityZoneId; } @Override public final Builder availabilityZoneId(String availabilityZoneId) { this.availabilityZoneId = availabilityZoneId; return this; } public final Integer getEnableLniAtDeviceIndex() { return enableLniAtDeviceIndex; } public final void setEnableLniAtDeviceIndex(Integer enableLniAtDeviceIndex) { this.enableLniAtDeviceIndex = enableLniAtDeviceIndex; } @Override public final Builder enableLniAtDeviceIndex(Integer enableLniAtDeviceIndex) { this.enableLniAtDeviceIndex = enableLniAtDeviceIndex; return this; } public final Boolean getMapCustomerOwnedIpOnLaunch() { return mapCustomerOwnedIpOnLaunch; } public final void setMapCustomerOwnedIpOnLaunch(Boolean mapCustomerOwnedIpOnLaunch) { this.mapCustomerOwnedIpOnLaunch = mapCustomerOwnedIpOnLaunch; } @Override public final Builder mapCustomerOwnedIpOnLaunch(Boolean mapCustomerOwnedIpOnLaunch) { this.mapCustomerOwnedIpOnLaunch = mapCustomerOwnedIpOnLaunch; return this; } public final String getCustomerOwnedIpv4Pool() { return customerOwnedIpv4Pool; } public final void setCustomerOwnedIpv4Pool(String customerOwnedIpv4Pool) { this.customerOwnedIpv4Pool = customerOwnedIpv4Pool; } @Override public final Builder customerOwnedIpv4Pool(String customerOwnedIpv4Pool) { this.customerOwnedIpv4Pool = customerOwnedIpv4Pool; return this; } public final String getOwnerId() { return ownerId; } public final void setOwnerId(String ownerId) { this.ownerId = ownerId; } @Override public final Builder ownerId(String ownerId) { this.ownerId = ownerId; return this; } public final Boolean getAssignIpv6AddressOnCreation() { return assignIpv6AddressOnCreation; } public final void setAssignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation) { this.assignIpv6AddressOnCreation = assignIpv6AddressOnCreation; } @Override public final Builder assignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation) { this.assignIpv6AddressOnCreation = assignIpv6AddressOnCreation; return this; } public final List getIpv6CidrBlockAssociationSet() { List result = SubnetIpv6CidrBlockAssociationSetCopier .copyToBuilder(this.ipv6CidrBlockAssociationSet); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setIpv6CidrBlockAssociationSet( Collection ipv6CidrBlockAssociationSet) { this.ipv6CidrBlockAssociationSet = SubnetIpv6CidrBlockAssociationSetCopier .copyFromBuilder(ipv6CidrBlockAssociationSet); } @Override public final Builder ipv6CidrBlockAssociationSet(Collection ipv6CidrBlockAssociationSet) { this.ipv6CidrBlockAssociationSet = SubnetIpv6CidrBlockAssociationSetCopier.copy(ipv6CidrBlockAssociationSet); return this; } @Override @SafeVarargs public final Builder ipv6CidrBlockAssociationSet(SubnetIpv6CidrBlockAssociation... ipv6CidrBlockAssociationSet) { ipv6CidrBlockAssociationSet(Arrays.asList(ipv6CidrBlockAssociationSet)); return this; } @Override @SafeVarargs public final Builder ipv6CidrBlockAssociationSet( Consumer... ipv6CidrBlockAssociationSet) { ipv6CidrBlockAssociationSet(Stream.of(ipv6CidrBlockAssociationSet) .map(c -> SubnetIpv6CidrBlockAssociation.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final List getTags() { List result = TagListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final String getSubnetArn() { return subnetArn; } public final void setSubnetArn(String subnetArn) { this.subnetArn = subnetArn; } @Override public final Builder subnetArn(String subnetArn) { this.subnetArn = subnetArn; return this; } public final String getOutpostArn() { return outpostArn; } public final void setOutpostArn(String outpostArn) { this.outpostArn = outpostArn; } @Override public final Builder outpostArn(String outpostArn) { this.outpostArn = outpostArn; return this; } public final Boolean getEnableDns64() { return enableDns64; } public final void setEnableDns64(Boolean enableDns64) { this.enableDns64 = enableDns64; } @Override public final Builder enableDns64(Boolean enableDns64) { this.enableDns64 = enableDns64; return this; } public final Boolean getIpv6Native() { return ipv6Native; } public final void setIpv6Native(Boolean ipv6Native) { this.ipv6Native = ipv6Native; } @Override public final Builder ipv6Native(Boolean ipv6Native) { this.ipv6Native = ipv6Native; return this; } public final PrivateDnsNameOptionsOnLaunch.Builder getPrivateDnsNameOptionsOnLaunch() { return privateDnsNameOptionsOnLaunch != null ? privateDnsNameOptionsOnLaunch.toBuilder() : null; } public final void setPrivateDnsNameOptionsOnLaunch(PrivateDnsNameOptionsOnLaunch.BuilderImpl privateDnsNameOptionsOnLaunch) { this.privateDnsNameOptionsOnLaunch = privateDnsNameOptionsOnLaunch != null ? privateDnsNameOptionsOnLaunch.build() : null; } @Override public final Builder privateDnsNameOptionsOnLaunch(PrivateDnsNameOptionsOnLaunch privateDnsNameOptionsOnLaunch) { this.privateDnsNameOptionsOnLaunch = privateDnsNameOptionsOnLaunch; return this; } public final String getSubnetId() { return subnetId; } public final void setSubnetId(String subnetId) { this.subnetId = subnetId; } @Override public final Builder subnetId(String subnetId) { this.subnetId = subnetId; return this; } public final String getState() { return state; } public final void setState(String state) { this.state = state; } @Override public final Builder state(String state) { this.state = state; return this; } @Override public final Builder state(SubnetState state) { this.state(state == null ? null : state.toString()); return this; } public final String getVpcId() { return vpcId; } public final void setVpcId(String vpcId) { this.vpcId = vpcId; } @Override public final Builder vpcId(String vpcId) { this.vpcId = vpcId; return this; } public final String getCidrBlock() { return cidrBlock; } public final void setCidrBlock(String cidrBlock) { this.cidrBlock = cidrBlock; } @Override public final Builder cidrBlock(String cidrBlock) { this.cidrBlock = cidrBlock; return this; } public final Integer getAvailableIpAddressCount() { return availableIpAddressCount; } public final void setAvailableIpAddressCount(Integer availableIpAddressCount) { this.availableIpAddressCount = availableIpAddressCount; } @Override public final Builder availableIpAddressCount(Integer availableIpAddressCount) { this.availableIpAddressCount = availableIpAddressCount; return this; } public final String getAvailabilityZone() { return availabilityZone; } public final void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } @Override public final Builder availabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; return this; } public final Boolean getDefaultForAz() { return defaultForAz; } public final void setDefaultForAz(Boolean defaultForAz) { this.defaultForAz = defaultForAz; } @Override public final Builder defaultForAz(Boolean defaultForAz) { this.defaultForAz = defaultForAz; return this; } public final Boolean getMapPublicIpOnLaunch() { return mapPublicIpOnLaunch; } public final void setMapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch) { this.mapPublicIpOnLaunch = mapPublicIpOnLaunch; } @Override public final Builder mapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch) { this.mapPublicIpOnLaunch = mapPublicIpOnLaunch; return this; } @Override public Subnet build() { return new Subnet(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy