@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Tag extends Object implements Serializable, Cloneable, StructuredPojo
Specifies a key-value pair for a resource tag.
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
Tag |
clone() |
boolean |
equals(Object obj) |
String |
getKey()
A value that specifies the
TagKey , the name of the tag. |
String |
getValue()
A value that specifies the
TagValue , the value assigned to the corresponding tag key. |
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setKey(String key)
A value that specifies the
TagKey , the name of the tag. |
void |
setValue(String value)
A value that specifies the
TagValue , the value assigned to the corresponding tag key. |
String |
toString()
Returns a string representation of this object.
|
Tag |
withKey(String key)
A value that specifies the
TagKey , the name of the tag. |
Tag |
withValue(String value)
A value that specifies the
TagValue , the value assigned to the corresponding tag key. |
public void setKey(String key)
A value that specifies the TagKey
, the name of the tag. Tag keys must be unique for the resource to
which they are attached.
key
- A value that specifies the TagKey
, the name of the tag. Tag keys must be unique for the
resource to which they are attached.public String getKey()
A value that specifies the TagKey
, the name of the tag. Tag keys must be unique for the resource to
which they are attached.
TagKey
, the name of the tag. Tag keys must be unique for the
resource to which they are attached.public Tag withKey(String key)
A value that specifies the TagKey
, the name of the tag. Tag keys must be unique for the resource to
which they are attached.
key
- A value that specifies the TagKey
, the name of the tag. Tag keys must be unique for the
resource to which they are attached.public void setValue(String value)
A value that specifies the TagValue
, the value assigned to the corresponding tag key. Tag values can
be null and don't have to be unique in a tag set. For example, you can have a key-value pair in a tag set of
finances : April
and also of payroll : April
.
value
- A value that specifies the TagValue
, the value assigned to the corresponding tag key. Tag
values can be null and don't have to be unique in a tag set. For example, you can have a key-value pair in
a tag set of finances : April
and also of payroll : April
.public String getValue()
A value that specifies the TagValue
, the value assigned to the corresponding tag key. Tag values can
be null and don't have to be unique in a tag set. For example, you can have a key-value pair in a tag set of
finances : April
and also of payroll : April
.
TagValue
, the value assigned to the corresponding tag key. Tag
values can be null and don't have to be unique in a tag set. For example, you can have a key-value pair
in a tag set of finances : April
and also of payroll : April
.public Tag withValue(String value)
A value that specifies the TagValue
, the value assigned to the corresponding tag key. Tag values can
be null and don't have to be unique in a tag set. For example, you can have a key-value pair in a tag set of
finances : April
and also of payroll : April
.
value
- A value that specifies the TagValue
, the value assigned to the corresponding tag key. Tag
values can be null and don't have to be unique in a tag set. For example, you can have a key-value pair in
a tag set of finances : April
and also of payroll : April
.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.