@NotThreadSafe public static final class SearchMessagesParams.Builder extends Object
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.
| Modifier and Type | Method and Description |
|---|---|
SearchMessagesParams |
build()
Builds a new
SearchMessagesParams. |
SearchMessagesParams.Builder |
from(SearchMessagesParamsIF instance)
Fill a builder with attribute values from the provided
SearchMessagesParamsIF instance. |
SearchMessagesParams.Builder |
setCount(int count)
Initializes the value for the
count attribute. |
SearchMessagesParams.Builder |
setPage(int page)
Initializes the value for the
page attribute. |
SearchMessagesParams.Builder |
setQuery(String query)
Initializes the value for the
query attribute. |
SearchMessagesParams.Builder |
setShouldHighlight(boolean shouldHighlight)
Initializes the value for the
shouldHighlight attribute. |
SearchMessagesParams.Builder |
setSort(ResultSort sort)
Initializes the value for the
sort attribute. |
SearchMessagesParams.Builder |
setSortOrder(ResultSortOrder sortOrder)
Initializes the value for the
sortOrder attribute. |
public final SearchMessagesParams.Builder from(SearchMessagesParamsIF instance)
SearchMessagesParamsIF instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SearchMessagesParams.Builder setQuery(String query)
query attribute.query - The value for querythis builder for use in a chained invocationpublic final SearchMessagesParams.Builder setShouldHighlight(boolean shouldHighlight)
shouldHighlight attribute.
If not set, this attribute will have a default value as returned by the initializer of shouldHighlight.
shouldHighlight - The value for shouldHighlightthis builder for use in a chained invocationpublic final SearchMessagesParams.Builder setCount(int count)
count attribute.
If not set, this attribute will have a default value as returned by the initializer of count.
count - The value for countthis builder for use in a chained invocationpublic final SearchMessagesParams.Builder setPage(int page)
page attribute.
If not set, this attribute will have a default value as returned by the initializer of page.
page - The value for pagethis builder for use in a chained invocationpublic final SearchMessagesParams.Builder setSort(ResultSort sort)
sort attribute.
If not set, this attribute will have a default value as returned by the initializer of sort.
sort - The value for sortthis builder for use in a chained invocationpublic final SearchMessagesParams.Builder setSortOrder(ResultSortOrder sortOrder)
sortOrder attribute.
If not set, this attribute will have a default value as returned by the initializer of sortOrder.
sortOrder - The value for sortOrderthis builder for use in a chained invocationpublic SearchMessagesParams build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
SearchMessagesParams.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.