Class ChatUpdateMessageParams

java.lang.Object
com.hubspot.slack.client.methods.params.chat.ChatUpdateMessageParams
All Implemented Interfaces:
HasChannel, ChatUpdateMessageParamsIF, MessageParams

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

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

  • Method Details

    • getAttachments

      public List<Attachment> getAttachments()
      Specified by:
      getAttachments in interface MessageParams
      Returns:
      The value of the attachments attribute
    • getBlocks

      public List<Block> getBlocks()
      Specified by:
      getBlocks in interface MessageParams
      Returns:
      The value of the blocks attribute
    • getChannelId

      public String getChannelId()
      Specified by:
      getChannelId in interface ChatUpdateMessageParamsIF
      Specified by:
      getChannelId in interface HasChannel
      Returns:
      The value of the channelId attribute
    • getText

      public Optional<String> getText()
      Specified by:
      getText in interface ChatUpdateMessageParamsIF
      Specified by:
      getText in interface MessageParams
      Returns:
      The value of the text attribute
    • getTs

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

      public Optional<Boolean> getAsUser()
      Specified by:
      getAsUser in interface ChatUpdateMessageParamsIF
      Returns:
      The value of the asUser attribute
    • shouldLinkNames

      public boolean shouldLinkNames()
      Specified by:
      shouldLinkNames in interface ChatUpdateMessageParamsIF
      Returns:
      The value of the shouldLinkNames attribute
    • getParse

      public String getParse()
      Specified by:
      getParse in interface ChatUpdateMessageParamsIF
      Returns:
      The value of the parse attribute
    • withAttachments

      public final ChatUpdateMessageParams withAttachments(Attachment... elements)
      Copy the current immutable object with elements that replace the content of attachments.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAttachments

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

      public final ChatUpdateMessageParams 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 ChatUpdateMessageParams 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
    • withChannelId

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

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

      public final ChatUpdateMessageParams withText(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the text 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 text
      Returns:
      A modified copy or this if not changed
    • withTs

      public final ChatUpdateMessageParams 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
    • withAsUser

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

      public final ChatUpdateMessageParams withAsUser(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the asUser 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 asUser
      Returns:
      A modified copy or this if not changed
    • withShouldLinkNames

      public final ChatUpdateMessageParams withShouldLinkNames(boolean value)
      Copy the current immutable object by setting a value for the shouldLinkNames attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for shouldLinkNames
      Returns:
      A modified copy or the this object
    • withParse

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ChatUpdateMessageParams 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: attachments, blocks, channelId, text, ts, asUser, shouldLinkNames, parse.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ChatUpdateMessageParams.Builder builder()
      Creates a builder for ChatUpdateMessageParams.
       ChatUpdateMessageParams.builder()
          .addAttachments|addAllAttachments(com.hubspot.slack.client.models.Attachment) // attachments elements
          .addBlocks|addAllBlocks(com.hubspot.slack.client.models.blocks.Block) // blocks elements
          .setChannelId(String) // required channelId
          .setText(Optional<String>) // optional text
          .setTs(String) // required ts
          .setAsUser(Optional<Boolean>) // optional asUser
          .setShouldLinkNames(boolean) // optional shouldLinkNames
          .setParse(String) // optional parse
          .build();
       
      Returns:
      A new ChatUpdateMessageParams builder