com.amazonaws.services.ec2.model
Class Subnet

java.lang.Object
  extended by com.amazonaws.services.ec2.model.Subnet
All Implemented Interfaces:
java.io.Serializable

public class Subnet
extends java.lang.Object
implements java.io.Serializable

Describes a subnet.

See Also:
Serialized Form

Constructor Summary
Subnet()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Subnet

public Subnet()
Method Detail

getSubnetId

public java.lang.String getSubnetId()
The ID of the subnet.

Returns:
The ID of the subnet.

setSubnetId

public void setSubnetId(java.lang.String subnetId)
The ID of the subnet.

Parameters:
subnetId - The ID of the subnet.

withSubnetId

public Subnet withSubnetId(java.lang.String subnetId)
The ID of the subnet.

Returns a reference to this object so that method calls can be chained together.

Parameters:
subnetId - The ID of the subnet.
Returns:
A reference to this updated object so that method calls can be chained together.

getState

public java.lang.String getState()
The current state of the subnet.

Constraints:
Allowed Values: pending, available

Returns:
The current state of the subnet.
See Also:
SubnetState

setState

public void setState(java.lang.String state)
The current state of the subnet.

Constraints:
Allowed Values: pending, available

Parameters:
state - The current state of the subnet.
See Also:
SubnetState

withState

public Subnet withState(java.lang.String state)
The current state of the subnet.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: pending, available

Parameters:
state - The current state of the subnet.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
SubnetState

setState

public void setState(SubnetState state)
The current state of the subnet.

Constraints:
Allowed Values: pending, available

Parameters:
state - The current state of the subnet.
See Also:
SubnetState

withState

public Subnet withState(SubnetState state)
The current state of the subnet.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: pending, available

Parameters:
state - The current state of the subnet.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
SubnetState

getVpcId

public java.lang.String getVpcId()
The ID of the VPC the subnet is in.

Returns:
The ID of the VPC the subnet is in.

setVpcId

public void setVpcId(java.lang.String vpcId)
The ID of the VPC the subnet is in.

Parameters:
vpcId - The ID of the VPC the subnet is in.

withVpcId

public Subnet withVpcId(java.lang.String vpcId)
The ID of the VPC the subnet is in.

Returns a reference to this object so that method calls can be chained together.

Parameters:
vpcId - The ID of the VPC the subnet is in.
Returns:
A reference to this updated object so that method calls can be chained together.

getCidrBlock

public java.lang.String getCidrBlock()
The CIDR block assigned to the subnet.

Returns:
The CIDR block assigned to the subnet.

setCidrBlock

public void setCidrBlock(java.lang.String cidrBlock)
The CIDR block assigned to the subnet.

Parameters:
cidrBlock - The CIDR block assigned to the subnet.

withCidrBlock

public Subnet withCidrBlock(java.lang.String cidrBlock)
The CIDR block assigned to the subnet.

Returns a reference to this object so that method calls can be chained together.

Parameters:
cidrBlock - The CIDR block assigned to the subnet.
Returns:
A reference to this updated object so that method calls can be chained together.

getAvailableIpAddressCount

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.

Returns:
The number of unused IP addresses in the subnet. Note that the IP addresses for any stopped instances are considered unavailable.

setAvailableIpAddressCount

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.

Parameters:
availableIpAddressCount - The number of unused IP addresses in the subnet. Note that the IP addresses for any stopped instances are considered unavailable.

withAvailableIpAddressCount

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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
availableIpAddressCount - The number of unused IP addresses in the subnet. Note that the IP addresses for any stopped instances are considered unavailable.
Returns:
A reference to this updated object so that method calls can be chained together.

getAvailabilityZone

public java.lang.String getAvailabilityZone()
The Availability Zone of the subnet.

Returns:
The Availability Zone of the subnet.

setAvailabilityZone

public void setAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone of the subnet.

Parameters:
availabilityZone - The Availability Zone of the subnet.

withAvailabilityZone

public Subnet withAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone of the subnet.

Returns a reference to this object so that method calls can be chained together.

Parameters:
availabilityZone - The Availability Zone of the subnet.
Returns:
A reference to this updated object so that method calls can be chained together.

isDefaultForAz

public java.lang.Boolean isDefaultForAz()
Indicates whether this is the default subnet for the Availability Zone.

Returns:
Indicates whether this is the default subnet for the Availability Zone.

setDefaultForAz

public void setDefaultForAz(java.lang.Boolean defaultForAz)
Indicates whether this is the default subnet for the Availability Zone.

Parameters:
defaultForAz - Indicates whether this is the default subnet for the Availability Zone.

withDefaultForAz

public Subnet withDefaultForAz(java.lang.Boolean defaultForAz)
Indicates whether this is the default subnet for the Availability Zone.

Returns a reference to this object so that method calls can be chained together.

Parameters:
defaultForAz - Indicates whether this is the default subnet for the Availability Zone.
Returns:
A reference to this updated object so that method calls can be chained together.

getDefaultForAz

public java.lang.Boolean getDefaultForAz()
Indicates whether this is the default subnet for the Availability Zone.

Returns:
Indicates whether this is the default subnet for the Availability Zone.

isMapPublicIpOnLaunch

public java.lang.Boolean isMapPublicIpOnLaunch()
Indicates whether instances launched in this subnet receive a public IP address.

Returns:
Indicates whether instances launched in this subnet receive a public IP address.

setMapPublicIpOnLaunch

public void setMapPublicIpOnLaunch(java.lang.Boolean mapPublicIpOnLaunch)
Indicates whether instances launched in this subnet receive a public IP address.

Parameters:
mapPublicIpOnLaunch - Indicates whether instances launched in this subnet receive a public IP address.

withMapPublicIpOnLaunch

public Subnet withMapPublicIpOnLaunch(java.lang.Boolean mapPublicIpOnLaunch)
Indicates whether instances launched in this subnet receive a public IP address.

Returns a reference to this object so that method calls can be chained together.

Parameters:
mapPublicIpOnLaunch - Indicates whether instances launched in this subnet receive a public IP address.
Returns:
A reference to this updated object so that method calls can be chained together.

getMapPublicIpOnLaunch

public java.lang.Boolean getMapPublicIpOnLaunch()
Indicates whether instances launched in this subnet receive a public IP address.

Returns:
Indicates whether instances launched in this subnet receive a public IP address.

getTags

public java.util.List<Tag> getTags()
Any tags assigned to the subnet.

Returns:
Any tags assigned to the subnet.

setTags

public void setTags(java.util.Collection<Tag> tags)
Any tags assigned to the subnet.

Parameters:
tags - Any tags assigned to the subnet.

withTags

public Subnet withTags(Tag... tags)
Any tags assigned to the subnet.

Returns a reference to this object so that method calls can be chained together.

Parameters:
tags - Any tags assigned to the subnet.
Returns:
A reference to this updated object so that method calls can be chained together.

withTags

public Subnet withTags(java.util.Collection<Tag> tags)
Any tags assigned to the subnet.

Returns a reference to this object so that method calls can be chained together.

Parameters:
tags - Any tags assigned to the subnet.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.