@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Filter extends Object implements Serializable, Cloneable
A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.
If you specify multiple filters, the filters are joined with an AND, and the request returns only
results that match all of the specified filters.
| Constructor and Description |
|---|
Filter()
Default constructor for Filter object.
|
Filter(String name)
Constructs a new Filter object.
|
Filter(String name,
List<String> values)
Constructs a new Filter object.
|
| Modifier and Type | Method and Description |
|---|---|
Filter |
clone() |
boolean |
equals(Object obj) |
String |
getName()
The name of the filter.
|
List<String> |
getValues()
The filter values.
|
int |
hashCode() |
void |
setName(String name)
The name of the filter.
|
void |
setValues(Collection<String> values)
The filter values.
|
String |
toString()
Returns a string representation of this object.
|
Filter |
withName(String name)
The name of the filter.
|
Filter |
withValues(Collection<String> values)
The filter values.
|
Filter |
withValues(String... values)
The filter values.
|
public Filter()
public Filter(String name)
name - The name of the filter. Filter names are case-sensitive.public Filter(String name, List<String> values)
name - The name of the filter. Filter names are case-sensitive.values - The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the
values are joined with an OR, and the request returns all results that match any of the
specified values.public void setName(String name)
The name of the filter. Filter names are case-sensitive.
name - The name of the filter. Filter names are case-sensitive.public String getName()
The name of the filter. Filter names are case-sensitive.
public Filter withName(String name)
The name of the filter. Filter names are case-sensitive.
name - The name of the filter. Filter names are case-sensitive.public List<String> getValues()
The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are
joined with an OR, and the request returns all results that match any of the specified values.
OR, and the request returns all results that match any of the
specified values.public void setValues(Collection<String> values)
The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are
joined with an OR, and the request returns all results that match any of the specified values.
values - The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the
values are joined with an OR, and the request returns all results that match any of the
specified values.public Filter withValues(String... values)
The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are
joined with an OR, and the request returns all results that match any of the specified values.
NOTE: This method appends the values to the existing list (if any). Use
setValues(java.util.Collection) or withValues(java.util.Collection) if you want to override the
existing values.
values - The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the
values are joined with an OR, and the request returns all results that match any of the
specified values.public Filter withValues(Collection<String> values)
The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are
joined with an OR, and the request returns all results that match any of the specified values.
values - The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the
values are joined with an OR, and the request returns all results that match any of the
specified values.public String toString()
toString in class ObjectObject.toString()