@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class SearchExpression extends Object implements Serializable, Cloneable, StructuredPojo
A multi-expression that searches for the specified resource or resources in a search. All resource objects that
satisfy the expression's condition are included in the search results. You must specify at least one subexpression,
filter, or nested filter. A SearchExpression
can contain up to twenty elements.
A SearchExpression
contains the following components:
A list of Filter
objects. Each filter defines a simple Boolean expression comprised of a resource
property name, Boolean operator, and value.
A list of NestedFilter
objects. Each nested filter defines a list of Boolean expressions using a list of
resource properties. A nested filter is satisfied if a single object in the list satisfies all Boolean expressions.
A list of SearchExpression
objects. A search expression object can be nested in a list of search
expression objects.
A Boolean operator: And
or Or
.
Constructor and Description |
---|
SearchExpression() |
Modifier and Type | Method and Description |
---|---|
SearchExpression |
clone() |
boolean |
equals(Object obj) |
List<Filter> |
getFilters()
A list of filter objects.
|
List<NestedFilters> |
getNestedFilters()
A list of nested filter objects.
|
String |
getOperator()
A Boolean operator used to evaluate the search expression.
|
List<SearchExpression> |
getSubExpressions()
A list of search expression objects.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setFilters(Collection<Filter> filters)
A list of filter objects.
|
void |
setNestedFilters(Collection<NestedFilters> nestedFilters)
A list of nested filter objects.
|
void |
setOperator(String operator)
A Boolean operator used to evaluate the search expression.
|
void |
setSubExpressions(Collection<SearchExpression> subExpressions)
A list of search expression objects.
|
String |
toString()
Returns a string representation of this object.
|
SearchExpression |
withFilters(Collection<Filter> filters)
A list of filter objects.
|
SearchExpression |
withFilters(Filter... filters)
A list of filter objects.
|
SearchExpression |
withNestedFilters(Collection<NestedFilters> nestedFilters)
A list of nested filter objects.
|
SearchExpression |
withNestedFilters(NestedFilters... nestedFilters)
A list of nested filter objects.
|
SearchExpression |
withOperator(BooleanOperator operator)
A Boolean operator used to evaluate the search expression.
|
SearchExpression |
withOperator(String operator)
A Boolean operator used to evaluate the search expression.
|
SearchExpression |
withSubExpressions(Collection<SearchExpression> subExpressions)
A list of search expression objects.
|
SearchExpression |
withSubExpressions(SearchExpression... subExpressions)
A list of search expression objects.
|
public List<Filter> getFilters()
A list of filter objects.
public void setFilters(Collection<Filter> filters)
A list of filter objects.
filters
- A list of filter objects.public SearchExpression withFilters(Filter... filters)
A list of filter objects.
NOTE: This method appends the values to the existing list (if any). Use
setFilters(java.util.Collection)
or withFilters(java.util.Collection)
if you want to override
the existing values.
filters
- A list of filter objects.public SearchExpression withFilters(Collection<Filter> filters)
A list of filter objects.
filters
- A list of filter objects.public List<NestedFilters> getNestedFilters()
A list of nested filter objects.
public void setNestedFilters(Collection<NestedFilters> nestedFilters)
A list of nested filter objects.
nestedFilters
- A list of nested filter objects.public SearchExpression withNestedFilters(NestedFilters... nestedFilters)
A list of nested filter objects.
NOTE: This method appends the values to the existing list (if any). Use
setNestedFilters(java.util.Collection)
or withNestedFilters(java.util.Collection)
if you want
to override the existing values.
nestedFilters
- A list of nested filter objects.public SearchExpression withNestedFilters(Collection<NestedFilters> nestedFilters)
A list of nested filter objects.
nestedFilters
- A list of nested filter objects.public List<SearchExpression> getSubExpressions()
A list of search expression objects.
public void setSubExpressions(Collection<SearchExpression> subExpressions)
A list of search expression objects.
subExpressions
- A list of search expression objects.public SearchExpression withSubExpressions(SearchExpression... subExpressions)
A list of search expression objects.
NOTE: This method appends the values to the existing list (if any). Use
setSubExpressions(java.util.Collection)
or withSubExpressions(java.util.Collection)
if you want
to override the existing values.
subExpressions
- A list of search expression objects.public SearchExpression withSubExpressions(Collection<SearchExpression> subExpressions)
A list of search expression objects.
subExpressions
- A list of search expression objects.public void setOperator(String operator)
A Boolean operator used to evaluate the search expression. If you want every conditional statement in all lists
to be satisfied for the entire search expression to be true, specify And
. If only a single
conditional statement needs to be true for the entire search expression to be true, specify Or
. The
default value is And
.
operator
- A Boolean operator used to evaluate the search expression. If you want every conditional statement in all
lists to be satisfied for the entire search expression to be true, specify And
. If only a
single conditional statement needs to be true for the entire search expression to be true, specify
Or
. The default value is And
.BooleanOperator
public String getOperator()
A Boolean operator used to evaluate the search expression. If you want every conditional statement in all lists
to be satisfied for the entire search expression to be true, specify And
. If only a single
conditional statement needs to be true for the entire search expression to be true, specify Or
. The
default value is And
.
And
. If only a
single conditional statement needs to be true for the entire search expression to be true, specify
Or
. The default value is And
.BooleanOperator
public SearchExpression withOperator(String operator)
A Boolean operator used to evaluate the search expression. If you want every conditional statement in all lists
to be satisfied for the entire search expression to be true, specify And
. If only a single
conditional statement needs to be true for the entire search expression to be true, specify Or
. The
default value is And
.
operator
- A Boolean operator used to evaluate the search expression. If you want every conditional statement in all
lists to be satisfied for the entire search expression to be true, specify And
. If only a
single conditional statement needs to be true for the entire search expression to be true, specify
Or
. The default value is And
.BooleanOperator
public SearchExpression withOperator(BooleanOperator operator)
A Boolean operator used to evaluate the search expression. If you want every conditional statement in all lists
to be satisfied for the entire search expression to be true, specify And
. If only a single
conditional statement needs to be true for the entire search expression to be true, specify Or
. The
default value is And
.
operator
- A Boolean operator used to evaluate the search expression. If you want every conditional statement in all
lists to be satisfied for the entire search expression to be true, specify And
. If only a
single conditional statement needs to be true for the entire search expression to be true, specify
Or
. The default value is And
.BooleanOperator
public String toString()
toString
in class Object
Object.toString()
public SearchExpression clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.