@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Tag extends Object implements Serializable, Cloneable, StructuredPojo
A custom key-value pair associated with a resource such as a CloudTrail trail, event data store, or channel.
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
Tag |
clone() |
boolean |
equals(Object obj) |
String |
getKey()
The key in a key-value pair.
|
String |
getValue()
The value in a key-value pair of a tag.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setKey(String key)
The key in a key-value pair.
|
void |
setValue(String value)
The value in a key-value pair of a tag.
|
String |
toString()
Returns a string representation of this object.
|
Tag |
withKey(String key)
The key in a key-value pair.
|
Tag |
withValue(String value)
The value in a key-value pair of a tag.
|
public void setKey(String key)
The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
key
- The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must
be unique for the resource to which it applies.public String getKey()
The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
public Tag withKey(String key)
The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
key
- The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must
be unique for the resource to which it applies.public void setValue(String value)
The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
value
- The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.public String getValue()
The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
public Tag withValue(String value)
The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
value
- The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.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.