Class ChatPostEphemeralMessageParams

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

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

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

  • Method Details

    • getText

      public Optional<String> getText()
      Specified by:
      getText in interface MessageParams
      Returns:
      The value of the text attribute
    • 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 ChatPostEphemeralMessageParamsIF
      Specified by:
      getChannelId in interface HasChannel
      Returns:
      The value of the channelId attribute
    • getUserToSendTo

      public String getUserToSendTo()
      Specified by:
      getUserToSendTo in interface ChatPostEphemeralMessageParamsIF
      Returns:
      The value of the userToSendTo attribute
    • getSendAsUser

      public Optional<Boolean> getSendAsUser()
      Specified by:
      getSendAsUser in interface ChatPostEphemeralMessageParamsIF
      Returns:
      The value of the sendAsUser attribute
    • getThreadTs

      public Optional<String> getThreadTs()
      Specified by:
      getThreadTs in interface ChatPostEphemeralMessageParamsIF
      Returns:
      The value of the threadTs attribute
    • getShouldLinkNames

      public boolean getShouldLinkNames()
      Specified by:
      getShouldLinkNames in interface ChatPostEphemeralMessageParamsIF
      Returns:
      The value of the shouldLinkNames attribute
    • getParseMode

      public String getParseMode()
      Specified by:
      getParseMode in interface ChatPostEphemeralMessageParamsIF
      Returns:
      The value of the parseMode attribute
    • withText

      public final ChatPostEphemeralMessageParams 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 ChatPostEphemeralMessageParams 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
    • withAttachments

      public final ChatPostEphemeralMessageParams 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 ChatPostEphemeralMessageParams 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 ChatPostEphemeralMessageParams 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 ChatPostEphemeralMessageParams 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 ChatPostEphemeralMessageParams 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
    • withUserToSendTo

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

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

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

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

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

      public final ChatPostEphemeralMessageParams 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
    • withParseMode

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

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

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

      Creates an immutable copy of a ChatPostEphemeralMessageParamsIF 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 ChatPostEphemeralMessageParams instance
    • builder

      public static ChatPostEphemeralMessageParams.Builder builder()
      Creates a builder for ChatPostEphemeralMessageParams.
       ChatPostEphemeralMessageParams.builder()
          .setText(Optional<String>) // optional text
          .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
          .setUserToSendTo(String) // required userToSendTo
          .setSendAsUser(Optional<Boolean>) // optional sendAsUser
          .setThreadTs(Optional<String>) // optional threadTs
          .setShouldLinkNames(boolean) // optional shouldLinkNames
          .setParseMode(String) // optional parseMode
          .build();
       
      Returns:
      A new ChatPostEphemeralMessageParams builder