Class ChatAppendStreamParams

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

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

Use the builder to create immutable instances: ChatAppendStreamParams.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 ChatAppendStreamParamsIF
      Returns:
      The value of the ts attribute
    • withChannel

      public final ChatAppendStreamParams 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 ChatAppendStreamParams 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 ChatAppendStreamParams 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 ChatAppendStreamParams 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 ChatAppendStreamParams 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 ChatAppendStreamParams 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
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ChatAppendStreamParams 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.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ChatAppendStreamParams copyOf(ChatAppendStreamParamsIF instance)
      Creates an immutable copy of a ChatAppendStreamParamsIF 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 ChatAppendStreamParams instance
    • builder

      public static ChatAppendStreamParams.Builder builder()
      Creates a builder for ChatAppendStreamParams.
       ChatAppendStreamParams.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
          .build();
       
      Returns:
      A new ChatAppendStreamParams builder