@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Tag extends Object implements Serializable, Cloneable
Describes a tag.
Constructor and Description |
---|
Tag()
Default constructor for Tag object.
|
Tag(String key)
Constructs a new Tag object.
|
Tag(String key,
String value)
Constructs a new Tag object.
|
Modifier and Type | Method and Description |
---|---|
Tag |
clone() |
boolean |
equals(Object obj) |
String |
getKey()
The key of the tag.
|
String |
getValue()
The value of the tag.
|
int |
hashCode() |
void |
setKey(String key)
The key of the tag.
|
void |
setValue(String value)
The value of the tag.
|
String |
toString()
Returns a string representation of this object.
|
Tag |
withKey(String key)
The key of the tag.
|
Tag |
withValue(String value)
The value of the tag.
|
public Tag()
public Tag(String key)
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:
.
public Tag(String key, String value)
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 256 Unicode characters.
public void setKey(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:
.
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:
.
public 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:
.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin
with aws:
.
public Tag withKey(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:
.
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:
.
public void setValue(String value)
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.
value
- The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.
public String getValue()
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.
public Tag withValue(String value)
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.
value
- The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.
public String toString()
toString
in class Object
Object.toString()