@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Tag extends Object implements Serializable, Cloneable, StructuredPojo
A structure containing a tag. A tag is metadata that you can attach to your resources to help organize and categorize them. You can also use them to help you secure your resources. For more information, see Controlling access to Amazon Web Services resources using tags.
For more information about tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide.
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
Tag |
clone() |
boolean |
equals(Object obj) |
String |
getKey()
The key, or name, attached to the tag.
|
String |
getValue()
The string value attached to the tag.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setKey(String key)
The key, or name, attached to the tag.
|
void |
setValue(String value)
The string value attached to the tag.
|
String |
toString()
Returns a string representation of this object.
|
Tag |
withKey(String key)
The key, or name, attached to the tag.
|
Tag |
withValue(String value)
The string value attached to the tag.
|
public void setKey(String key)
The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.
key
- The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.public String getKey()
The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.
public Tag withKey(String key)
The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.
key
- The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.public void setValue(String value)
The string value attached to the tag. The value can be an empty string. Key values are case sensitive.
value
- The string value attached to the tag. The value can be an empty string. Key values are case sensitive.public String getValue()
The string value attached to the tag. The value can be an empty string. Key values are case sensitive.
public Tag withValue(String value)
The string value attached to the tag. The value can be an empty string. Key values are case sensitive.
value
- The string value attached to the tag. The value can be an empty string. Key values are case sensitive.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.