Class ChannelsListResponse.Builder

java.lang.Object
com.hubspot.slack.client.models.response.channels.ChannelsListResponse.Builder
Enclosing class:
ChannelsListResponse

@Generated(from="ChannelsListResponseIF", generator="Immutables") @NotThreadSafe public static final class ChannelsListResponse.Builder extends Object
Builds instances of type ChannelsListResponse. 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 ChannelsListResponse.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.ChannelsListResponseIF instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setOk

      public final ChannelsListResponse.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 ChannelsListResponse.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 ChannelsListResponse.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
    • addChannels

      public final ChannelsListResponse.Builder addChannels(SlackChannel element)
      Adds one element to channels list.
      Parameters:
      element - A channels element
      Returns:
      this builder for use in a chained invocation
    • addChannels

      public final ChannelsListResponse.Builder addChannels(SlackChannel... elements)
      Adds elements to channels list.
      Parameters:
      elements - An array of channels elements
      Returns:
      this builder for use in a chained invocation
    • setChannels

      public final ChannelsListResponse.Builder setChannels(Iterable<? extends SlackChannel> elements)
      Sets or replaces all elements for channels list.
      Parameters:
      elements - An iterable of channels elements
      Returns:
      this builder for use in a chained invocation
    • addAllChannels

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

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