Class ChatStopStreamParams

java.lang.Object
com.hubspot.slack.client.methods.params.stream.ChatStopStreamParams
All Implemented Interfaces:
ChatStopStreamParamsIF, StreamParams

@Generated(from="ChatStopStreamParamsIF", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ChatStopStreamParams extends Object implements ChatStopStreamParamsIF
Immutable implementation of ChatStopStreamParamsIF.

Use the builder to create immutable instances: ChatStopStreamParams.builder().

  • Method Details

    • getChannel

      public String getChannel()
      Specified by:
      getChannel in interface StreamParams
      Returns:
      The value of the channel attribute
    • getMarkdownText

      public Optional<String> getMarkdownText()
      Specified by:
      getMarkdownText in interface StreamParams
      Returns:
      The value of the markdownText attribute
    • getChunks

      public com.google.common.collect.ImmutableList<StreamChunk> getChunks()
      Specified by:
      getChunks in interface StreamParams
      Returns:
      The value of the chunks attribute
    • getTs

      public String getTs()
      Specified by:
      getTs in interface ChatStopStreamParamsIF
      Returns:
      The value of the ts attribute
    • getBlocks

      public com.google.common.collect.ImmutableList<Block> getBlocks()
      Specified by:
      getBlocks in interface ChatStopStreamParamsIF
      Returns:
      The value of the blocks attribute
    • getMetadata

      public Optional<StreamMetadata> getMetadata()
      Specified by:
      getMetadata in interface ChatStopStreamParamsIF
      Returns:
      The value of the metadata attribute
    • withChannel

      public final ChatStopStreamParams withChannel(String value)
      Copy the current immutable object by setting a value for the channel attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for channel
      Returns:
      A modified copy or the this object
    • withMarkdownText

      public final ChatStopStreamParams withMarkdownText(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional markdownText attribute.
      Parameters:
      value - The value for markdownText, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withMarkdownText

      public final ChatStopStreamParams withMarkdownText(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the markdownText attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for markdownText
      Returns:
      A modified copy or this if not changed
    • withChunks

      public final ChatStopStreamParams withChunks(StreamChunk... elements)
      Copy the current immutable object with elements that replace the content of chunks.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withChunks

      public final ChatStopStreamParams withChunks(Iterable<? extends StreamChunk> elements)
      Copy the current immutable object with elements that replace the content of chunks. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of chunks elements to set
      Returns:
      A modified copy or this if not changed
    • withTs

      public final ChatStopStreamParams withTs(String value)
      Copy the current immutable object by setting a value for the ts attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for ts
      Returns:
      A modified copy or the this object
    • withBlocks

      public final ChatStopStreamParams withBlocks(Block... elements)
      Copy the current immutable object with elements that replace the content of blocks.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withBlocks

      public final ChatStopStreamParams withBlocks(Iterable<? extends Block> elements)
      Copy the current immutable object with elements that replace the content of blocks. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of blocks elements to set
      Returns:
      A modified copy or this if not changed
    • withMetadata

      public final ChatStopStreamParams withMetadata(@Nullable StreamMetadata value)
      Copy the current immutable object by setting a present value for the optional metadata attribute.
      Parameters:
      value - The value for metadata, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withMetadata

      public final ChatStopStreamParams withMetadata(Optional<? extends StreamMetadata> optional)
      Copy the current immutable object by setting an optional value for the metadata attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for metadata
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ChatStopStreamParams that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: channel, markdownText, chunks, ts, blocks, metadata.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ChatStopStreamParams with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ChatStopStreamParams copyOf(ChatStopStreamParamsIF instance)
      Creates an immutable copy of a ChatStopStreamParamsIF value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable ChatStopStreamParams instance
    • builder

      public static ChatStopStreamParams.Builder builder()
      Creates a builder for ChatStopStreamParams.
       ChatStopStreamParams.builder()
          .setChannel(String) // required channel
          .setMarkdownText(Optional<String>) // optional markdownText
          .addChunks|addAllChunks(com.hubspot.slack.client.methods.params.stream.chunks.StreamChunk) // chunks elements
          .setTs(String) // required ts
          .addBlocks|addAllBlocks(com.hubspot.slack.client.models.blocks.Block) // blocks elements
          .setMetadata(Optional<StreamMetadata>) // optional metadata
          .build();
       
      Returns:
      A new ChatStopStreamParams builder