com.amazonaws.services.ec2.model
Class Tag

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

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

Describes a tag.

See Also:
Serialized Form

Constructor Summary
Tag()
          Default constructor for a new Tag object.
Tag(java.lang.String key)
          Constructs a new Tag object.
Tag(java.lang.String key, java.lang.String value)
          Constructs a new Tag object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getKey()
          The key of the tag.
 java.lang.String getValue()
          The value of the tag.
 int hashCode()
           
 void setKey(java.lang.String key)
          The key of the tag.
 void setValue(java.lang.String value)
          The value of the tag.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 Tag withKey(java.lang.String key)
          The key of the tag.
 Tag withValue(java.lang.String value)
          The value of the tag.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tag

public Tag()
Default constructor for a new Tag object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


Tag

public Tag(java.lang.String key,
           java.lang.String value)
Constructs a new Tag object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
key - The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

value - The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.


Tag

public Tag(java.lang.String key)
Constructs a new Tag object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
key - The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

Method Detail

getKey

public java.lang.String getKey()
The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

Returns:
The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:


setKey

public void setKey(java.lang.String key)
The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

Parameters:
key - The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:


withKey

public Tag withKey(java.lang.String key)
The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

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

Parameters:
key - The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

Returns:
A reference to this updated object so that method calls can be chained together.

getValue

public java.lang.String getValue()
The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:
The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.


setValue

public void setValue(java.lang.String value)
The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Parameters:
value - The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.


withValue

public Tag withValue(java.lang.String value)
The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

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

Parameters:
value - The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

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.