Class ChannelsHistoryResponse.Builder
java.lang.Object
com.hubspot.slack.client.models.response.channels.ChannelsHistoryResponse.Builder
- Enclosing class:
ChannelsHistoryResponse
@Generated(from="AbstractChannelsHistoryResponse",
generator="Immutables")
@NotThreadSafe
public static final class ChannelsHistoryResponse.Builder
extends Object
Builds instances of type
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.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllMessages(Iterable<? extends LiteMessage> elements) Adds elements tomessageslist.addMessages(LiteMessage element) Adds one element tomessageslist.addMessages(LiteMessage... elements) Adds elements tomessageslist.build()Builds a newChannelsHistoryResponse.from(TimeIntervalFilter instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.TimeIntervalFilterinstance.from(AbstractChannelsHistoryResponse instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.response.channels.AbstractChannelsHistoryResponseinstance.from(SlackResponse instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.response.SlackResponseinstance.setHasMore(boolean hasMore) Initializes the value for thehasMoreattribute.setInclusive(Boolean inclusive) Initializes the optional valueinclusiveto inclusive.setInclusive(Optional<Boolean> inclusive) Initializes the optional valueinclusiveto inclusive.setMessages(Iterable<? extends LiteMessage> elements) Sets or replaces all elements formessageslist.setNewestTimestamp(String newestTimestamp) Initializes the optional valuenewestTimestampto newestTimestamp.setNewestTimestamp(Optional<String> newestTimestamp) Initializes the optional valuenewestTimestampto newestTimestamp.setOk(boolean ok) Initializes the value for theokattribute.setOldestTimestamp(String oldestTimestamp) Initializes the optional valueoldestTimestampto oldestTimestamp.setOldestTimestamp(Optional<String> oldestTimestamp) Initializes the optional valueoldestTimestampto oldestTimestamp.setResponseMetadata(ResponseMetadata responseMetadata) Initializes the optional valueresponseMetadatato responseMetadata.setResponseMetadata(Optional<? extends ResponseMetadata> responseMetadata) Initializes the optional valueresponseMetadatato responseMetadata.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.response.SlackResponseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.response.channels.AbstractChannelsHistoryResponseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.TimeIntervalFilterinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setOk
Initializes the value for theokattribute.- Parameters:
ok- The value for ok- Returns:
thisbuilder for use in a chained invocation
-
setResponseMetadata
public final ChannelsHistoryResponse.Builder setResponseMetadata(@Nullable ResponseMetadata responseMetadata) Initializes the optional valueresponseMetadatato responseMetadata.- Parameters:
responseMetadata- The value for responseMetadata,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setResponseMetadata
public final ChannelsHistoryResponse.Builder setResponseMetadata(Optional<? extends ResponseMetadata> responseMetadata) Initializes the optional valueresponseMetadatato responseMetadata.- Parameters:
responseMetadata- The value for responseMetadata- Returns:
thisbuilder for use in a chained invocation
-
setInclusive
Initializes the optional valueinclusiveto inclusive.- Parameters:
inclusive- The value for inclusive,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setInclusive
Initializes the optional valueinclusiveto inclusive.- Parameters:
inclusive- The value for inclusive- Returns:
thisbuilder for use in a chained invocation
-
setNewestTimestamp
Initializes the optional valuenewestTimestampto newestTimestamp.- Parameters:
newestTimestamp- The value for newestTimestamp,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setNewestTimestamp
Initializes the optional valuenewestTimestampto newestTimestamp.- Parameters:
newestTimestamp- The value for newestTimestamp- Returns:
thisbuilder for use in a chained invocation
-
setOldestTimestamp
Initializes the optional valueoldestTimestampto oldestTimestamp.- Parameters:
oldestTimestamp- The value for oldestTimestamp,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setOldestTimestamp
Initializes the optional valueoldestTimestampto oldestTimestamp.- Parameters:
oldestTimestamp- The value for oldestTimestamp- Returns:
thisbuilder for use in a chained invocation
-
setHasMore
Initializes the value for thehasMoreattribute.- Parameters:
hasMore- The value for hasMore- Returns:
thisbuilder for use in a chained invocation
-
addMessages
Adds one element tomessageslist.- Parameters:
element- A messages element- Returns:
thisbuilder for use in a chained invocation
-
addMessages
Adds elements tomessageslist.- Parameters:
elements- An array of messages elements- Returns:
thisbuilder for use in a chained invocation
-
setMessages
Sets or replaces all elements formessageslist.- Parameters:
elements- An iterable of messages elements- Returns:
thisbuilder for use in a chained invocation
-
addAllMessages
public final ChannelsHistoryResponse.Builder addAllMessages(Iterable<? extends LiteMessage> elements) Adds elements tomessageslist.- Parameters:
elements- An iterable of messages elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newChannelsHistoryResponse.- Returns:
- An immutable instance of ChannelsHistoryResponse
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-