Class ServiceSearchRequest
java.lang.Object
com.eqixiac.equinix.internetaccess.model.json.creators.ServiceSearchRequest
Request body for searching Equinix Internet Access (EIA) v2 services via
POST /internetAccess/v2/services/search.
Wraps an AND group of equality expressions. Each expression matches a service
property (a JSON pointer such as /state or /name) against one or more
values. Build it fluently:
ServiceSearchRequest filter = new ServiceSearchRequest()
.state(ServiceState.ACTIVE)
.equals("/locations/metroCode", "DC")
.sort(ServiceSearchSortProperty.NAME, SortOrder.ASC);
Live behaviour (observed 2026-11-11). /type is listed by the spec and by the
service's own "allowed properties" message, but every value (including SINGLE, which
the service returns on read) is rejected with HTTP 400 EQ-7108002 "Invalid value", so
this builder refuses a /type filter. /state works. Sorting is the
sort query parameter, not part of the body.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOne equality expression (AndQuery).static classThefilterobject: anandgroup of expressions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds an equality expression to theANDgroup.Adds an equality expression to theANDgroup.Returns thesortquery-parameter value.sort(ServiceSearchSortProperty property, SortOrder direction) Adds a sort directive (sortquery parameter, for example/name,-/state).state(ServiceState... states) Filters by service state (/state).
-
Constructor Details
-
ServiceSearchRequest
public ServiceSearchRequest()
-
-
Method Details
-
state
Filters by service state (/state).- Parameters:
states- the states to match;UNKNOWNis rejected- Returns:
- this request for chaining
-
sort
Adds a sort directive (sortquery parameter, for example/name,-/state).- Parameters:
property- the property to sort bydirection- the direction;nullmeans ascending- Returns:
- this request for chaining
-
getSortParameter
Returns thesortquery-parameter value.- Returns:
- the comma-joined sort directives, or
nullwhen none were added
-
equals
Adds an equality expression to theANDgroup.- Parameters:
property- the property pointer to match (e.g./state)values- the values to match against- Returns:
- this request for chaining
- Throws:
IllegalArgumentException- for/type, which the live service rejects
-
equals
Adds an equality expression to theANDgroup.- Parameters:
property- the property pointer to match (e.g./state)values- the values to match against- Returns:
- this request for chaining
- Throws:
IllegalArgumentException- for/type, which the live service rejects
-