Class AssetSearchRequest

java.lang.Object
com.eqixiac.equinix.customerportal.model.json.creators.AssetSearchRequest

public class AssetSearchRequest extends Object
Request for searching assets (POST /v1/assets/search, AssetsSearchRequest).

The serialized body carries a typed filter (ibxs, cages, productTypes and a dateRange). The optional search query parameters (q, source, exactMatch, sorts) are carried out-of-band (not serialized in the body) and applied as query parameters by the client. source and sorts are collectionFormat: csv in the spec and are sent comma-separated.

  • Constructor Details

    • AssetSearchRequest

      public AssetSearchRequest(AssetSearchFilter filter)
      Creates an asset search request with a typed filter.
      Parameters:
      filter - the search filter, or null to search without filtering
  • Method Details

    • q

      public AssetSearchRequest q(String q)
      Sets the free-text search query (q query parameter).
      Parameters:
      q - the search query
      Returns:
      this request
    • source

      public AssetSearchRequest source(List<AssetSearchSource> source)
      Restricts the fields the free-text query is matched against (source query parameter).
      Parameters:
      source - the fields to search, or null to search all fields
      Returns:
      this request
    • exactMatch

      public AssetSearchRequest exactMatch(Boolean exactMatch)
      Sets whether the free-text query should match exactly (exactMatch query parameter).
      Parameters:
      exactMatch - true for an exact match
      Returns:
      this request
    • sorts

      public AssetSearchRequest sorts(List<String> sorts)
      Sets the result sort expressions (sorts query parameter).
      Parameters:
      sorts - the sort fields from the spec enum, for example IBX or -INSTALLED_DATE (a leading - sorts descending)
      Returns:
      this request