@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class TagFilter extends Object implements Serializable, Cloneable, StructuredPojo
A tag key and optional list of possible values that you can use to filter results for tagged resources.
Constructor and Description |
---|
TagFilter() |
Modifier and Type | Method and Description |
---|---|
TagFilter |
clone() |
boolean |
equals(Object obj) |
String |
getTagKey()
The tag key.
|
List<String> |
getTagValues()
A list of zero or more tag values.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setTagKey(String tagKey)
The tag key.
|
void |
setTagValues(Collection<String> tagValues)
A list of zero or more tag values.
|
String |
toString()
Returns a string representation of this object.
|
TagFilter |
withTagKey(String tagKey)
The tag key.
|
TagFilter |
withTagValues(Collection<String> tagValues)
A list of zero or more tag values.
|
TagFilter |
withTagValues(String... tagValues)
A list of zero or more tag values.
|
public void setTagKey(String tagKey)
The tag key. This must have a valid string value and can't be empty.
tagKey
- The tag key. This must have a valid string value and can't be empty.public String getTagKey()
The tag key. This must have a valid string value and can't be empty.
public TagFilter withTagKey(String tagKey)
The tag key. This must have a valid string value and can't be empty.
tagKey
- The tag key. This must have a valid string value and can't be empty.public List<String> getTagValues()
A list of zero or more tag values. If no values are provided, then the filter matches any tag with the specified key, regardless of its value.
public void setTagValues(Collection<String> tagValues)
A list of zero or more tag values. If no values are provided, then the filter matches any tag with the specified key, regardless of its value.
tagValues
- A list of zero or more tag values. If no values are provided, then the filter matches any tag with the
specified key, regardless of its value.public TagFilter withTagValues(String... tagValues)
A list of zero or more tag values. If no values are provided, then the filter matches any tag with the specified key, regardless of its value.
NOTE: This method appends the values to the existing list (if any). Use
setTagValues(java.util.Collection)
or withTagValues(java.util.Collection)
if you want to
override the existing values.
tagValues
- A list of zero or more tag values. If no values are provided, then the filter matches any tag with the
specified key, regardless of its value.public TagFilter withTagValues(Collection<String> tagValues)
A list of zero or more tag values. If no values are provided, then the filter matches any tag with the specified key, regardless of its value.
tagValues
- A list of zero or more tag values. If no values are provided, then the filter matches any tag with the
specified key, regardless of its value.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.