Class SearchOptions.Builder

    • Field Detail

      • path

        protected java.lang.String path
      • maxResults

        protected long maxResults
      • filenameOnly

        protected boolean filenameOnly
      • fileExtensions

        protected java.util.List<java.lang.String> fileExtensions
      • fileCategories

        protected java.util.List<FileCategory> fileCategories
    • Constructor Detail

      • Builder

        protected Builder()
    • Method Detail

      • withPath

        public SearchOptions.Builder withPath​(java.lang.String path)
        Set value for optional field.
        Parameters:
        path - Scopes the search to a path in the user's Dropbox. Searches the entire Dropbox if not specified. Must match pattern "(/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/.*)?)".
        Returns:
        this builder
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • withMaxResults

        public SearchOptions.Builder withMaxResults​(java.lang.Long maxResults)
        Set value for optional field.

        If left unset or set to null, defaults to 100L.

        Parameters:
        maxResults - The maximum number of search results to return. Must be greater than or equal to 1 and be less than or equal to 1000. Defaults to 100L when set to null.
        Returns:
        this builder
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • withOrderBy

        public SearchOptions.Builder withOrderBy​(SearchOrderBy orderBy)
        Set value for optional field.
        Parameters:
        orderBy - Specified property of the order of search results. By default, results are sorted by relevance.
        Returns:
        this builder
      • withFileStatus

        public SearchOptions.Builder withFileStatus​(FileStatus fileStatus)
        Set value for optional field.

        If left unset or set to null, defaults to FileStatus.ACTIVE.

        Parameters:
        fileStatus - Restricts search to the given file status. Must not be null. Defaults to FileStatus.ACTIVE when set to null.
        Returns:
        this builder
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • withFilenameOnly

        public SearchOptions.Builder withFilenameOnly​(java.lang.Boolean filenameOnly)
        Set value for optional field.

        If left unset or set to null, defaults to false.

        Parameters:
        filenameOnly - Restricts search to only match on filenames. Defaults to false when set to null.
        Returns:
        this builder
      • withFileExtensions

        public SearchOptions.Builder withFileExtensions​(java.util.List<java.lang.String> fileExtensions)
        Set value for optional field.
        Parameters:
        fileExtensions - Restricts search to only the extensions specified. Only supported for active file search. Must not contain a null item.
        Returns:
        this builder
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • withFileCategories

        public SearchOptions.Builder withFileCategories​(java.util.List<FileCategory> fileCategories)
        Set value for optional field.
        Parameters:
        fileCategories - Restricts search to only the file categories specified. Only supported for active file search. Must not contain a null item.
        Returns:
        this builder
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.