Class Tag
- java.lang.Object
-
- com.amazonaws.services.cloudtrail.model.Tag
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Tag extends Object implements Serializable, Cloneable
A custom key-value pair associated with a resource such as a CloudTrail trail.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Tag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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
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; useful for testing and debugging.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.
-
-
-
Method Detail
-
setKey
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.
- Parameters:
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.
-
getKey
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.
- Returns:
- 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.
-
withKey
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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setValue
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.
- Parameters:
value
- The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
-
getValue
public String getValue()
The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
- Returns:
- The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
-
withValue
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.
- Parameters:
value
- The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.- 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 classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-