public class Tag
extends java.lang.Object
implements java.io.Serializable
A key-value pair. A tag consists of a tag key and a tag value. Tag keys and tag values are both required, but tag values can be empty (null) strings.
For information about the rules that apply to tag keys and tag values, see User-Defined Tag Restrictions in the AWS Billing and Cost Management User Guide.
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getTagKey()
The key of the tag.
|
java.lang.String |
getTagValue()
The value of the tag.
|
int |
hashCode() |
void |
setTagKey(java.lang.String tagKey)
The key of the tag.
|
void |
setTagValue(java.lang.String tagValue)
The value of the tag.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Tag |
withTagKey(java.lang.String tagKey)
The key of the tag.
|
Tag |
withTagValue(java.lang.String tagValue)
The value of the tag.
|
public java.lang.String getTagKey()
The key of the tag.
Constraints:
Length: 1 - 128
The key of the tag.
public void setTagKey(java.lang.String tagKey)
The key of the tag.
Constraints:
Length: 1 - 128
tagKey
- The key of the tag.
public Tag withTagKey(java.lang.String tagKey)
The key of the tag.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
tagKey
- The key of the tag.
public java.lang.String getTagValue()
The value of the tag.
Constraints:
Length: 0 - 256
The value of the tag.
public void setTagValue(java.lang.String tagValue)
The value of the tag.
Constraints:
Length: 0 - 256
tagValue
- The value of the tag.
public Tag withTagValue(java.lang.String tagValue)
The value of the tag.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 256
tagValue
- The value of the tag.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.