java.lang.Object
com.amazonaws.services.elasticache.model.Tag
All Implemented Interfaces:
Serializable, Cloneable

public class Tag extends Object implements Serializable, 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.

See Also:
  • Constructor Details

    • Tag

      public Tag()
  • Method Details

    • setKey

      public void setKey(String key)

      The key for the tag.

      Parameters:
      key - The key for the tag.
    • getKey

      public String getKey()

      The key for the tag.

      Returns:
      The key for the tag.
    • withKey

      public Tag withKey(String key)

      The key for the tag.

      Parameters:
      key - The key for the tag.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setValue

      public void setValue(String value)

      The tag's value. May not be null.

      Parameters:
      value - The tag's value. May not be null.
    • getValue

      public String getValue()

      The tag's value. May not be null.

      Returns:
      The tag's value. May not be null.
    • withValue

      public Tag withValue(String value)

      The tag's value. May not be null.

      Parameters:
      value - The tag's value. May not be null.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Tag clone()
      Overrides:
      clone in class Object