public class Tag
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
A cost allocation Tag that can be added to an ElastiCache cluster or replication group. Tags are composed of a Key/Value pair. A tag with a null Value is permitted.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
key
The key for the tag.
|
private java.lang.String |
value
The tag's value.
|
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
Tag |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getKey()
The key for the tag.
|
java.lang.String |
getValue()
The tag's value.
|
int |
hashCode() |
void |
setKey(java.lang.String key)
The key for the tag.
|
void |
setValue(java.lang.String value)
The tag's value.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Tag |
withKey(java.lang.String key)
The key for the tag.
|
Tag |
withValue(java.lang.String value)
The tag's value.
|
private java.lang.String key
The key for the tag.
private java.lang.String value
The tag's value. May not be null.
public void setKey(java.lang.String key)
The key for the tag.
key
- The key for the tag.public java.lang.String getKey()
The key for the tag.
public Tag withKey(java.lang.String key)
The key for the tag.
key
- The key for the tag.public void setValue(java.lang.String value)
The tag's value. May not be null.
value
- The tag's value. May not be null.public java.lang.String getValue()
The tag's value. May not be null.
public Tag withValue(java.lang.String value)
The tag's value. May not be null.
value
- The tag's value. May not be null.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