Class SearchOptions

  • All Implemented Interfaces:
    com.ibm.cloud.sdk.core.service.model.ObjectModel

    public class SearchOptions
    extends com.ibm.cloud.sdk.core.service.model.GenericModel
    The search options.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SearchOptions.Builder
      Builder.
      static interface  SearchOptions.CanTag
      Determines if the result set must return the resources that the user can tag or the resources that the user can view (only a GhoST admin can use this parameter).
      static interface  SearchOptions.IsDeleted
      Determines if deleted documents should be included in result set or not.
      static interface  SearchOptions.IsProjectResource
      Determines if documents belonging to Project family should be included in result set or not.
      static interface  SearchOptions.IsPublic
      Determines if public resources should be included in result set or not.
      static interface  SearchOptions.IsReclaimed
      Determines if reclaimed documents should be included in result set or not.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String accountId()
      Gets the accountId.
      java.lang.String canTag()
      Gets the canTag.
      java.util.List<java.lang.String> fields()
      Gets the fields.
      java.lang.String impersonateUser()
      Gets the impersonateUser.
      java.lang.String isDeleted()
      Gets the isDeleted.
      java.lang.String isProjectResource()
      Gets the isProjectResource.
      java.lang.String isPublic()
      Gets the isPublic.
      java.lang.String isReclaimed()
      Gets the isReclaimed.
      java.lang.Long limit()
      Gets the limit.
      SearchOptions.Builder newBuilder()
      New builder.
      java.lang.String query()
      Gets the query.
      java.lang.String searchCursor()
      Gets the searchCursor.
      java.util.List<java.lang.String> sort()
      Gets the sort.
      java.lang.Long timeout()
      Gets the timeout.
      java.lang.String xCorrelationId()
      Gets the xCorrelationId.
      java.lang.String xRequestId()
      Gets the xRequestId.
      • Methods inherited from class com.ibm.cloud.sdk.core.service.model.GenericModel

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • query

        public java.lang.String query()
        Gets the query. The Lucene-formatted query string. Default to '*' if not set.
        Returns:
        the query
      • fields

        public java.util.List<java.lang.String> fields()
        Gets the fields. The list of the fields returned by the search. By default, the returned fields are the `account_id`, `name`, `type`, `family`, and `crn`. For all queries, `crn` is always returned. You may set `"fields": ["*"]` to discover the set of fields available to request.
        Returns:
        the fields
      • searchCursor

        public java.lang.String searchCursor()
        Gets the searchCursor. An opaque cursor that is returned on each call and that must be set on the subsequent call to get the next batch of items. If the search returns no items, then the search_cursor is not present in the response.
        Returns:
        the searchCursor
      • xRequestId

        public java.lang.String xRequestId()
        Gets the xRequestId. An alphanumeric string that is used to trace the request. The value may include ASCII alphanumerics and any of following segment separators: space ( ), comma (,), hyphen, (-), and underscore (_) and may have a length up to 1024 bytes. The value is considered invalid and must be ignored if that value includes any other character or is longer than 1024 bytes or is fewer than 8 characters. If not specified or invalid, it is automatically replaced by a random (version 4) UUID.
        Returns:
        the xRequestId
      • xCorrelationId

        public java.lang.String xCorrelationId()
        Gets the xCorrelationId. An alphanumeric string that is used to trace the request as a part of a larger context: the same value is used for downstream requests and retries of those requests. The value may include ASCII alphanumerics and any of following segment separators: space ( ), comma (,), hyphen, (-), and underscore (_) and may have a length up to 1024 bytes. The value is considered invalid and must be ignored if that value includes any other character or is longer than 1024 bytes or is fewer than 8 characters. If not specified or invalid, it is automatically replaced by a random (version 4) UUID.
        Returns:
        the xCorrelationId
      • accountId

        public java.lang.String accountId()
        Gets the accountId. The account ID to filter resources.
        Returns:
        the accountId
      • limit

        public java.lang.Long limit()
        Gets the limit. The maximum number of hits to return. Defaults to 10.
        Returns:
        the limit
      • timeout

        public java.lang.Long timeout()
        Gets the timeout. A search timeout in milliseconds, bounding the search request to run within the specified time value and bail with the hits accumulated up to that point when expired. Defaults to the system defined timeout.
        Returns:
        the timeout
      • sort

        public java.util.List<java.lang.String> sort()
        Gets the sort. Comma separated properties names that are used for sorting.
        Returns:
        the sort
      • isDeleted

        public java.lang.String isDeleted()
        Gets the isDeleted. Determines if deleted documents should be included in result set or not. Possible values are false (default), true or any. If false, only existing documents are returned; if true, only deleted documents are returned; If any, both existing and deleted documents are returned. (_for administrators only_).
        Returns:
        the isDeleted
      • isReclaimed

        public java.lang.String isReclaimed()
        Gets the isReclaimed. Determines if reclaimed documents should be included in result set or not. Possible values are false (default), true or any. If false, only not reclaimed documents are returned; if true, only reclaimed documents are returned; If any, both reclaimed and not reclaimed documents are returned.
        Returns:
        the isReclaimed
      • isPublic

        public java.lang.String isPublic()
        Gets the isPublic. Determines if public resources should be included in result set or not. Possible values are false (default), true or any. If false, do not search public resources; if true, search only public resources; If any, search also public resources.
        Returns:
        the isPublic
      • impersonateUser

        public java.lang.String impersonateUser()
        Gets the impersonateUser. The user on whose behalf the search must be performed. Only a GhoST admin can impersonate a user, so be sure you set a GhoST admin IAM token in the Authorization header if you set this parameter. (_for administrators only_).
        Returns:
        the impersonateUser
      • canTag

        public java.lang.String canTag()
        Gets the canTag. Determines if the result set must return the resources that the user can tag or the resources that the user can view (only a GhoST admin can use this parameter). If false (default), only resources user can view are returned; if true, only resources that user has permissions for tagging are returned (_for administrators only_).
        Returns:
        the canTag
      • isProjectResource

        public java.lang.String isProjectResource()
        Gets the isProjectResource. Determines if documents belonging to Project family should be included in result set or not. Possible values are false (default), true or any. If false, documents belonging to all families except Project are returned; if true, only documents belonging to Project family are returned; if any, documents of any family are returned. Only authorized ServiceIds can use this query parameter.
        Returns:
        the isProjectResource