public class Subnet
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Describes a subnet.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
availabilityZone
The Availability Zone of the subnet.
|
private java.lang.Integer |
availableIpAddressCount
The number of unused IP addresses in the subnet.
|
private java.lang.String |
cidrBlock
The CIDR block assigned to the subnet.
|
private java.lang.Boolean |
defaultForAz
Indicates whether this is the default subnet for the Availability Zone.
|
private java.lang.Boolean |
mapPublicIpOnLaunch
Indicates whether instances launched in this subnet receive a public IP
address.
|
private java.lang.String |
state
The current state of the subnet.
|
private java.lang.String |
subnetId
The ID of the subnet.
|
private SdkInternalList<Tag> |
tags
Any tags assigned to the subnet.
|
private java.lang.String |
vpcId
The ID of the VPC the subnet is in.
|
Constructor and Description |
---|
Subnet() |
Modifier and Type | Method and Description |
---|---|
Subnet |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAvailabilityZone()
The Availability Zone of the subnet.
|
java.lang.Integer |
getAvailableIpAddressCount()
The number of unused IP addresses in the subnet.
|
java.lang.String |
getCidrBlock()
The CIDR block assigned to the subnet.
|
java.lang.Boolean |
getDefaultForAz()
Indicates whether this is the default subnet for the Availability Zone.
|
java.lang.Boolean |
getMapPublicIpOnLaunch()
Indicates whether instances launched in this subnet receive a public IP
address.
|
java.lang.String |
getState()
The current state of the subnet.
|
java.lang.String |
getSubnetId()
The ID of the subnet.
|
java.util.List<Tag> |
getTags()
Any tags assigned to the subnet.
|
java.lang.String |
getVpcId()
The ID of the VPC the subnet is in.
|
int |
hashCode() |
java.lang.Boolean |
isDefaultForAz()
Indicates whether this is the default subnet for the Availability Zone.
|
java.lang.Boolean |
isMapPublicIpOnLaunch()
Indicates whether instances launched in this subnet receive a public IP
address.
|
void |
setAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone of the subnet.
|
void |
setAvailableIpAddressCount(java.lang.Integer availableIpAddressCount)
The number of unused IP addresses in the subnet.
|
void |
setCidrBlock(java.lang.String cidrBlock)
The CIDR block assigned to the subnet.
|
void |
setDefaultForAz(java.lang.Boolean defaultForAz)
Indicates whether this is the default subnet for the Availability Zone.
|
void |
setMapPublicIpOnLaunch(java.lang.Boolean mapPublicIpOnLaunch)
Indicates whether instances launched in this subnet receive a public IP
address.
|
void |
setState(java.lang.String state)
The current state of the subnet.
|
void |
setState(SubnetState state)
The current state of the subnet.
|
void |
setSubnetId(java.lang.String subnetId)
The ID of the subnet.
|
void |
setTags(java.util.Collection<Tag> tags)
Any tags assigned to the subnet.
|
void |
setVpcId(java.lang.String vpcId)
The ID of the VPC the subnet is in.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Subnet |
withAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone of the subnet.
|
Subnet |
withAvailableIpAddressCount(java.lang.Integer availableIpAddressCount)
The number of unused IP addresses in the subnet.
|
Subnet |
withCidrBlock(java.lang.String cidrBlock)
The CIDR block assigned to the subnet.
|
Subnet |
withDefaultForAz(java.lang.Boolean defaultForAz)
Indicates whether this is the default subnet for the Availability Zone.
|
Subnet |
withMapPublicIpOnLaunch(java.lang.Boolean mapPublicIpOnLaunch)
Indicates whether instances launched in this subnet receive a public IP
address.
|
Subnet |
withState(java.lang.String state)
The current state of the subnet.
|
Subnet |
withState(SubnetState state)
The current state of the subnet.
|
Subnet |
withSubnetId(java.lang.String subnetId)
The ID of the subnet.
|
Subnet |
withTags(java.util.Collection<Tag> tags)
Any tags assigned to the subnet.
|
Subnet |
withTags(Tag... tags)
Any tags assigned to the subnet.
|
Subnet |
withVpcId(java.lang.String vpcId)
The ID of the VPC the subnet is in.
|
private java.lang.String subnetId
The ID of the subnet.
private java.lang.String state
The current state of the subnet.
private java.lang.String vpcId
The ID of the VPC the subnet is in.
private java.lang.String cidrBlock
The CIDR block assigned to the subnet.
private java.lang.Integer availableIpAddressCount
The number of unused IP addresses in the subnet. Note that the IP addresses for any stopped instances are considered unavailable.
private java.lang.String availabilityZone
The Availability Zone of the subnet.
private java.lang.Boolean defaultForAz
Indicates whether this is the default subnet for the Availability Zone.
private java.lang.Boolean mapPublicIpOnLaunch
Indicates whether instances launched in this subnet receive a public IP address.
private SdkInternalList<Tag> tags
Any tags assigned to the subnet.
public void setSubnetId(java.lang.String subnetId)
The ID of the subnet.
subnetId
- The ID of the subnet.public java.lang.String getSubnetId()
The ID of the subnet.
public Subnet withSubnetId(java.lang.String subnetId)
The ID of the subnet.
subnetId
- The ID of the subnet.public void setState(java.lang.String state)
The current state of the subnet.
state
- The current state of the subnet.SubnetState
public java.lang.String getState()
The current state of the subnet.
SubnetState
public Subnet withState(java.lang.String state)
The current state of the subnet.
state
- The current state of the subnet.SubnetState
public void setState(SubnetState state)
The current state of the subnet.
state
- The current state of the subnet.SubnetState
public Subnet withState(SubnetState state)
The current state of the subnet.
state
- The current state of the subnet.SubnetState
public void setVpcId(java.lang.String vpcId)
The ID of the VPC the subnet is in.
vpcId
- The ID of the VPC the subnet is in.public java.lang.String getVpcId()
The ID of the VPC the subnet is in.
public Subnet withVpcId(java.lang.String vpcId)
The ID of the VPC the subnet is in.
vpcId
- The ID of the VPC the subnet is in.public void setCidrBlock(java.lang.String cidrBlock)
The CIDR block assigned to the subnet.
cidrBlock
- The CIDR block assigned to the subnet.public java.lang.String getCidrBlock()
The CIDR block assigned to the subnet.
public Subnet withCidrBlock(java.lang.String cidrBlock)
The CIDR block assigned to the subnet.
cidrBlock
- The CIDR block assigned to the subnet.public void setAvailableIpAddressCount(java.lang.Integer availableIpAddressCount)
The number of unused IP addresses in the subnet. Note that the IP addresses for any stopped instances are considered unavailable.
availableIpAddressCount
- The number of unused IP addresses in the subnet. Note that the IP
addresses for any stopped instances are considered unavailable.public java.lang.Integer getAvailableIpAddressCount()
The number of unused IP addresses in the subnet. Note that the IP addresses for any stopped instances are considered unavailable.
public Subnet withAvailableIpAddressCount(java.lang.Integer availableIpAddressCount)
The number of unused IP addresses in the subnet. Note that the IP addresses for any stopped instances are considered unavailable.
availableIpAddressCount
- The number of unused IP addresses in the subnet. Note that the IP
addresses for any stopped instances are considered unavailable.public void setAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone of the subnet.
availabilityZone
- The Availability Zone of the subnet.public java.lang.String getAvailabilityZone()
The Availability Zone of the subnet.
public Subnet withAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone of the subnet.
availabilityZone
- The Availability Zone of the subnet.public void setDefaultForAz(java.lang.Boolean defaultForAz)
Indicates whether this is the default subnet for the Availability Zone.
defaultForAz
- Indicates whether this is the default subnet for the Availability
Zone.public java.lang.Boolean getDefaultForAz()
Indicates whether this is the default subnet for the Availability Zone.
public Subnet withDefaultForAz(java.lang.Boolean defaultForAz)
Indicates whether this is the default subnet for the Availability Zone.
defaultForAz
- Indicates whether this is the default subnet for the Availability
Zone.public java.lang.Boolean isDefaultForAz()
Indicates whether this is the default subnet for the Availability Zone.
public void setMapPublicIpOnLaunch(java.lang.Boolean mapPublicIpOnLaunch)
Indicates whether instances launched in this subnet receive a public IP address.
mapPublicIpOnLaunch
- Indicates whether instances launched in this subnet receive a
public IP address.public java.lang.Boolean getMapPublicIpOnLaunch()
Indicates whether instances launched in this subnet receive a public IP address.
public Subnet withMapPublicIpOnLaunch(java.lang.Boolean mapPublicIpOnLaunch)
Indicates whether instances launched in this subnet receive a public IP address.
mapPublicIpOnLaunch
- Indicates whether instances launched in this subnet receive a
public IP address.public java.lang.Boolean isMapPublicIpOnLaunch()
Indicates whether instances launched in this subnet receive a public IP address.
public java.util.List<Tag> getTags()
Any tags assigned to the subnet.
public void setTags(java.util.Collection<Tag> tags)
Any tags assigned to the subnet.
tags
- Any tags assigned to the subnet.public Subnet withTags(Tag... tags)
Any tags assigned to the subnet.
NOTE: This method appends the values to the existing list (if
any). Use setTags(java.util.Collection)
or
withTags(java.util.Collection)
if you want to override the
existing values.
tags
- Any tags assigned to the subnet.public Subnet withTags(java.util.Collection<Tag> tags)
Any tags assigned to the subnet.
tags
- Any tags assigned to the subnet.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Subnet clone()
clone
in class java.lang.Object