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 Details

    • from

      public final ChannelsHistoryResponse.Builder from(SlackResponse instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.response.SlackResponse instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.response.channels.AbstractChannelsHistoryResponse instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      Fill a builder with attribute values from the provided com.hubspot.slack.client.methods.TimeIntervalFilter instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setOk

      public final ChannelsHistoryResponse.Builder setOk(boolean ok)
      Initializes the value for the ok attribute.
      Parameters:
      ok - The value for ok
      Returns:
      this builder for use in a chained invocation
    • setResponseMetadata

      public final ChannelsHistoryResponse.Builder setResponseMetadata(@Nullable ResponseMetadata responseMetadata)
      Initializes the optional value responseMetadata to responseMetadata.
      Parameters:
      responseMetadata - The value for responseMetadata, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setResponseMetadata

      public final ChannelsHistoryResponse.Builder setResponseMetadata(Optional<? extends ResponseMetadata> responseMetadata)
      Initializes the optional value responseMetadata to responseMetadata.
      Parameters:
      responseMetadata - The value for responseMetadata
      Returns:
      this builder for use in a chained invocation
    • setInclusive

      public final ChannelsHistoryResponse.Builder setInclusive(@Nullable Boolean inclusive)
      Initializes the optional value inclusive to inclusive.
      Parameters:
      inclusive - The value for inclusive, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setInclusive

      public final ChannelsHistoryResponse.Builder setInclusive(Optional<Boolean> inclusive)
      Initializes the optional value inclusive to inclusive.
      Parameters:
      inclusive - The value for inclusive
      Returns:
      this builder for use in a chained invocation
    • setNewestTimestamp

      public final ChannelsHistoryResponse.Builder setNewestTimestamp(@Nullable String newestTimestamp)
      Initializes the optional value newestTimestamp to newestTimestamp.
      Parameters:
      newestTimestamp - The value for newestTimestamp, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setNewestTimestamp

      public final ChannelsHistoryResponse.Builder setNewestTimestamp(Optional<String> newestTimestamp)
      Initializes the optional value newestTimestamp to newestTimestamp.
      Parameters:
      newestTimestamp - The value for newestTimestamp
      Returns:
      this builder for use in a chained invocation
    • setOldestTimestamp

      public final ChannelsHistoryResponse.Builder setOldestTimestamp(@Nullable String oldestTimestamp)
      Initializes the optional value oldestTimestamp to oldestTimestamp.
      Parameters:
      oldestTimestamp - The value for oldestTimestamp, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setOldestTimestamp

      public final ChannelsHistoryResponse.Builder setOldestTimestamp(Optional<String> oldestTimestamp)
      Initializes the optional value oldestTimestamp to oldestTimestamp.
      Parameters:
      oldestTimestamp - The value for oldestTimestamp
      Returns:
      this builder for use in a chained invocation
    • setHasMore

      public final ChannelsHistoryResponse.Builder setHasMore(boolean hasMore)
      Initializes the value for the hasMore attribute.
      Parameters:
      hasMore - The value for hasMore
      Returns:
      this builder for use in a chained invocation
    • addMessages

      public final ChannelsHistoryResponse.Builder addMessages(LiteMessage element)
      Adds one element to messages list.
      Parameters:
      element - A messages element
      Returns:
      this builder for use in a chained invocation
    • addMessages

      public final ChannelsHistoryResponse.Builder addMessages(LiteMessage... elements)
      Adds elements to messages list.
      Parameters:
      elements - An array of messages elements
      Returns:
      this builder for use in a chained invocation
    • setMessages

      public final ChannelsHistoryResponse.Builder setMessages(Iterable<? extends LiteMessage> elements)
      Sets or replaces all elements for messages list.
      Parameters:
      elements - An iterable of messages elements
      Returns:
      this builder for use in a chained invocation
    • addAllMessages

      public final ChannelsHistoryResponse.Builder addAllMessages(Iterable<? extends LiteMessage> elements)
      Adds elements to messages list.
      Parameters:
      elements - An iterable of messages elements
      Returns:
      this builder for use in a chained invocation
    • build

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