public class Tag
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Specifies a key value pair for a resource tag.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
key
Specifies the
TagKey , the name of the tag. |
private java.lang.String |
value
Specifies the
TagValue , the value assigned to the
corresponding tag key. |
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
Tag |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getKey()
Specifies the
TagKey , the name of the tag. |
java.lang.String |
getValue()
Specifies the
TagValue , the value assigned to the
corresponding tag key. |
int |
hashCode() |
void |
setKey(java.lang.String key)
Specifies the
TagKey , the name of the tag. |
void |
setValue(java.lang.String value)
Specifies the
TagValue , the value assigned to the
corresponding tag key. |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Tag |
withKey(java.lang.String key)
Specifies the
TagKey , the name of the tag. |
Tag |
withValue(java.lang.String value)
Specifies the
TagValue , the value assigned to the
corresponding tag key. |
private java.lang.String key
Specifies the TagKey
, the name of the tag. Tag keys must be
unique for the Elasticsearch domain to which they are attached.
private java.lang.String value
Specifies the TagValue
, the value assigned to the
corresponding tag key. Tag values can be null and do not have to be
unique in a tag set. For example, you can have a key value pair in a tag
set of project : Trinity
and
cost-center : Trinity
public void setKey(java.lang.String key)
Specifies the TagKey
, the name of the tag. Tag keys must be
unique for the Elasticsearch domain to which they are attached.
key
- Specifies the TagKey
, the name of the tag. Tag keys
must be unique for the Elasticsearch domain to which they are
attached.public java.lang.String getKey()
Specifies the TagKey
, the name of the tag. Tag keys must be
unique for the Elasticsearch domain to which they are attached.
TagKey
, the name of the tag. Tag keys
must be unique for the Elasticsearch domain to which they are
attached.public Tag withKey(java.lang.String key)
Specifies the TagKey
, the name of the tag. Tag keys must be
unique for the Elasticsearch domain to which they are attached.
key
- Specifies the TagKey
, the name of the tag. Tag keys
must be unique for the Elasticsearch domain to which they are
attached.public void setValue(java.lang.String value)
Specifies the TagValue
, the value assigned to the
corresponding tag key. Tag values can be null and do not have to be
unique in a tag set. For example, you can have a key value pair in a tag
set of project : Trinity
and
cost-center : Trinity
value
- Specifies the TagValue
, the value assigned to the
corresponding tag key. Tag values can be null and do not have to
be unique in a tag set. For example, you can have a key value pair
in a tag set of project : Trinity
and
cost-center : Trinity
public java.lang.String getValue()
Specifies the TagValue
, the value assigned to the
corresponding tag key. Tag values can be null and do not have to be
unique in a tag set. For example, you can have a key value pair in a tag
set of project : Trinity
and
cost-center : Trinity
TagValue
, the value assigned to the
corresponding tag key. Tag values can be null and do not have to
be unique in a tag set. For example, you can have a key value
pair in a tag set of project : Trinity
and
cost-center : Trinity
public Tag withValue(java.lang.String value)
Specifies the TagValue
, the value assigned to the
corresponding tag key. Tag values can be null and do not have to be
unique in a tag set. For example, you can have a key value pair in a tag
set of project : Trinity
and
cost-center : Trinity
value
- Specifies the TagValue
, the value assigned to the
corresponding tag key. Tag values can be null and do not have to
be unique in a tag set. For example, you can have a key value pair
in a tag set of project : Trinity
and
cost-center : Trinity
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 Tag clone()
clone
in class java.lang.Object