@NotThreadSafe public static final class ChannelsHistoryResponse.Builder extends Object
ChannelsHistoryResponse.
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 |
|---|---|
ChannelsHistoryResponse.Builder |
addAllMessages(Iterable<? extends LiteMessage> elements)
Adds elements to
messages list. |
ChannelsHistoryResponse.Builder |
addMessages(LiteMessage... elements)
Adds elements to
messages list. |
ChannelsHistoryResponse.Builder |
addMessages(LiteMessage element)
Adds one element to
messages list. |
ChannelsHistoryResponse |
build()
Builds a new
ChannelsHistoryResponse. |
ChannelsHistoryResponse.Builder |
from(AbstractChannelsHistoryResponse instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.response.channels.AbstractChannelsHistoryResponse instance. |
ChannelsHistoryResponse.Builder |
from(SlackResponse instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.response.SlackResponse instance. |
ChannelsHistoryResponse.Builder |
from(TimeIntervalFilter instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.methods.TimeIntervalFilter instance. |
ChannelsHistoryResponse.Builder |
setHasMore(boolean hasMore)
Initializes the value for the
hasMore attribute. |
ChannelsHistoryResponse.Builder |
setInclusive(Boolean inclusive)
Initializes the optional value
inclusive to inclusive. |
ChannelsHistoryResponse.Builder |
setInclusive(Optional<Boolean> inclusive)
Initializes the optional value
inclusive to inclusive. |
ChannelsHistoryResponse.Builder |
setMessages(Iterable<? extends LiteMessage> elements)
Sets or replaces all elements for
messages list. |
ChannelsHistoryResponse.Builder |
setNewestTimestamp(Optional<String> newestTimestamp)
Initializes the optional value
newestTimestamp to newestTimestamp. |
ChannelsHistoryResponse.Builder |
setNewestTimestamp(String newestTimestamp)
Initializes the optional value
newestTimestamp to newestTimestamp. |
ChannelsHistoryResponse.Builder |
setOk(boolean ok)
Initializes the value for the
ok attribute. |
ChannelsHistoryResponse.Builder |
setOldestTimestamp(Optional<String> oldestTimestamp)
Initializes the optional value
oldestTimestamp to oldestTimestamp. |
ChannelsHistoryResponse.Builder |
setOldestTimestamp(String oldestTimestamp)
Initializes the optional value
oldestTimestamp to oldestTimestamp. |
ChannelsHistoryResponse.Builder |
setResponseMetadata(Optional<ResponseMetadata> responseMetadata)
Initializes the optional value
responseMetadata to responseMetadata. |
ChannelsHistoryResponse.Builder |
setResponseMetadata(ResponseMetadata responseMetadata)
Initializes the optional value
responseMetadata to responseMetadata. |
public final ChannelsHistoryResponse.Builder from(SlackResponse instance)
com.hubspot.slack.client.models.response.SlackResponse instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ChannelsHistoryResponse.Builder from(AbstractChannelsHistoryResponse instance)
com.hubspot.slack.client.models.response.channels.AbstractChannelsHistoryResponse instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ChannelsHistoryResponse.Builder from(TimeIntervalFilter instance)
com.hubspot.slack.client.methods.TimeIntervalFilter instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ChannelsHistoryResponse.Builder setHasMore(boolean hasMore)
hasMore attribute.hasMore - The value for hasMorethis builder for use in a chained invocationpublic final ChannelsHistoryResponse.Builder addMessages(LiteMessage element)
messages list.element - A messages elementthis builder for use in a chained invocationpublic final ChannelsHistoryResponse.Builder addMessages(LiteMessage... elements)
messages list.elements - An array of messages elementsthis builder for use in a chained invocationpublic final ChannelsHistoryResponse.Builder setMessages(Iterable<? extends LiteMessage> elements)
messages list.elements - An iterable of messages elementsthis builder for use in a chained invocationpublic final ChannelsHistoryResponse.Builder addAllMessages(Iterable<? extends LiteMessage> elements)
messages list.elements - An iterable of messages elementsthis builder for use in a chained invocationpublic final ChannelsHistoryResponse.Builder setOk(boolean ok)
ok attribute.ok - The value for okthis builder for use in a chained invocationpublic final ChannelsHistoryResponse.Builder setResponseMetadata(@Nullable ResponseMetadata responseMetadata)
responseMetadata to responseMetadata.responseMetadata - The value for responseMetadata, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ChannelsHistoryResponse.Builder setResponseMetadata(Optional<ResponseMetadata> responseMetadata)
responseMetadata to responseMetadata.responseMetadata - The value for responseMetadatathis builder for use in a chained invocationpublic final ChannelsHistoryResponse.Builder setInclusive(@Nullable Boolean inclusive)
inclusive to inclusive.inclusive - The value for inclusive, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ChannelsHistoryResponse.Builder setInclusive(Optional<Boolean> inclusive)
inclusive to inclusive.inclusive - The value for inclusivethis builder for use in a chained invocationpublic final ChannelsHistoryResponse.Builder setNewestTimestamp(@Nullable String newestTimestamp)
newestTimestamp to newestTimestamp.newestTimestamp - The value for newestTimestamp, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ChannelsHistoryResponse.Builder setNewestTimestamp(Optional<String> newestTimestamp)
newestTimestamp to newestTimestamp.newestTimestamp - The value for newestTimestampthis builder for use in a chained invocationpublic final ChannelsHistoryResponse.Builder setOldestTimestamp(@Nullable String oldestTimestamp)
oldestTimestamp to oldestTimestamp.oldestTimestamp - The value for oldestTimestamp, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ChannelsHistoryResponse.Builder setOldestTimestamp(Optional<String> oldestTimestamp)
oldestTimestamp to oldestTimestamp.oldestTimestamp - The value for oldestTimestampthis builder for use in a chained invocationpublic ChannelsHistoryResponse build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
ChannelsHistoryResponse.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.