Class SearchMessagesParams.Builder

java.lang.Object
com.hubspot.slack.client.methods.params.search.SearchMessagesParams.Builder
Enclosing class:
SearchMessagesParams

@Generated(from="SearchMessagesParamsIF", generator="Immutables") @NotThreadSafe public static final class SearchMessagesParams.Builder extends Object
Builds instances of type SearchMessagesParams. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      Fill a builder with attribute values from the provided SearchMessagesParamsIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setQuery

      public final SearchMessagesParams.Builder setQuery(String query)
      Initializes the value for the query attribute.
      Parameters:
      query - The value for query
      Returns:
      this builder for use in a chained invocation
    • setShouldHighlight

      public final SearchMessagesParams.Builder setShouldHighlight(boolean shouldHighlight)
      Initializes the value for the shouldHighlight attribute.

      If not set, this attribute will have a default value as returned by the initializer of shouldHighlight.

      Parameters:
      shouldHighlight - The value for shouldHighlight
      Returns:
      this builder for use in a chained invocation
    • setCount

      public final SearchMessagesParams.Builder setCount(int count)
      Initializes the value for the count attribute.

      If not set, this attribute will have a default value as returned by the initializer of count.

      Parameters:
      count - The value for count
      Returns:
      this builder for use in a chained invocation
    • setPage

      public final SearchMessagesParams.Builder setPage(int page)
      Initializes the value for the page attribute.

      If not set, this attribute will have a default value as returned by the initializer of page.

      Parameters:
      page - The value for page
      Returns:
      this builder for use in a chained invocation
    • setSort

      public final SearchMessagesParams.Builder setSort(ResultSort sort)
      Initializes the value for the sort attribute.

      If not set, this attribute will have a default value as returned by the initializer of sort.

      Parameters:
      sort - The value for sort
      Returns:
      this builder for use in a chained invocation
    • setSortOrder

      public final SearchMessagesParams.Builder setSortOrder(ResultSortOrder sortOrder)
      Initializes the value for the sortOrder attribute.

      If not set, this attribute will have a default value as returned by the initializer of sortOrder.

      Parameters:
      sortOrder - The value for sortOrder
      Returns:
      this builder for use in a chained invocation
    • build

      public SearchMessagesParams build()
      Builds a new SearchMessagesParams.
      Returns:
      An immutable instance of SearchMessagesParams
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing