Class ChatAppendStreamParams.Builder

java.lang.Object
com.hubspot.slack.client.methods.params.stream.ChatAppendStreamParams.Builder
Enclosing class:
ChatAppendStreamParams

@Generated(from="ChatAppendStreamParamsIF", generator="Immutables") @NotThreadSafe public static final class ChatAppendStreamParams.Builder extends Object
Builds instances of type ChatAppendStreamParams. 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 ChatAppendStreamParams.Builder from(StreamParams instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.methods.params.stream.StreamParams 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.params.stream.ChatAppendStreamParamsIF instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setChannel

      public final ChatAppendStreamParams.Builder setChannel(String channel)
      Initializes the value for the channel attribute.
      Parameters:
      channel - The value for channel
      Returns:
      this builder for use in a chained invocation
    • setMarkdownText

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

      public final ChatAppendStreamParams.Builder setMarkdownText(Optional<String> markdownText)
      Initializes the optional value markdownText to markdownText.
      Parameters:
      markdownText - The value for markdownText
      Returns:
      this builder for use in a chained invocation
    • addChunks

      public final ChatAppendStreamParams.Builder addChunks(StreamChunk element)
      Adds one element to chunks list.
      Parameters:
      element - A chunks element
      Returns:
      this builder for use in a chained invocation
    • addChunks

      public final ChatAppendStreamParams.Builder addChunks(StreamChunk... elements)
      Adds elements to chunks list.
      Parameters:
      elements - An array of chunks elements
      Returns:
      this builder for use in a chained invocation
    • setChunks

      public final ChatAppendStreamParams.Builder setChunks(Iterable<? extends StreamChunk> elements)
      Sets or replaces all elements for chunks list.
      Parameters:
      elements - An iterable of chunks elements
      Returns:
      this builder for use in a chained invocation
    • addAllChunks

      public final ChatAppendStreamParams.Builder addAllChunks(Iterable<? extends StreamChunk> elements)
      Adds elements to chunks list.
      Parameters:
      elements - An iterable of chunks elements
      Returns:
      this builder for use in a chained invocation
    • setTs

      public final ChatAppendStreamParams.Builder setTs(String ts)
      Initializes the value for the ts attribute.
      Parameters:
      ts - The value for ts
      Returns:
      this builder for use in a chained invocation
    • build

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