Class ChatStopStreamParams.Builder

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

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

      public final ChatStopStreamParams.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 ChatStopStreamParams.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 ChatStopStreamParams.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 ChatStopStreamParams.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 ChatStopStreamParams.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 ChatStopStreamParams.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 ChatStopStreamParams.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 ChatStopStreamParams.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
    • addBlocks

      public final ChatStopStreamParams.Builder addBlocks(Block element)
      Adds one element to blocks list.
      Parameters:
      element - A blocks element
      Returns:
      this builder for use in a chained invocation
    • addBlocks

      public final ChatStopStreamParams.Builder addBlocks(Block... elements)
      Adds elements to blocks list.
      Parameters:
      elements - An array of blocks elements
      Returns:
      this builder for use in a chained invocation
    • setBlocks

      public final ChatStopStreamParams.Builder setBlocks(Iterable<? extends Block> elements)
      Sets or replaces all elements for blocks list.
      Parameters:
      elements - An iterable of blocks elements
      Returns:
      this builder for use in a chained invocation
    • addAllBlocks

      public final ChatStopStreamParams.Builder addAllBlocks(Iterable<? extends Block> elements)
      Adds elements to blocks list.
      Parameters:
      elements - An iterable of blocks elements
      Returns:
      this builder for use in a chained invocation
    • setMetadata

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

      public final ChatStopStreamParams.Builder setMetadata(Optional<? extends StreamMetadata> metadata)
      Initializes the optional value metadata to metadata.
      Parameters:
      metadata - The value for metadata
      Returns:
      this builder for use in a chained invocation
    • build

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