Class SlashCommandResponseParams

All Implemented Interfaces:
HasChannel, MessageParams

@Generated(from="AbstractSlashCommandResponseParams", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class SlashCommandResponseParams extends AbstractSlashCommandResponseParams
Immutable implementation of AbstractSlashCommandResponseParams.

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

  • Method Details

    • getAttachments

      public List<Attachment> getAttachments()
      Returns:
      The value of the attachments attribute
    • getBlocks

      public List<Block> getBlocks()
      Returns:
      The value of the blocks attribute
    • getChannelId

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

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

      public Optional<String> getThreadTs()
      Specified by:
      getThreadTs in class AbstractChatMessageParams
      Returns:
      The value of the threadTs attribute
    • getUsername

      public Optional<String> getUsername()
      Specified by:
      getUsername in class AbstractChatMessageParams
      Returns:
      The value of the username attribute
    • getAsUser

      public Optional<Boolean> getAsUser()
      Specified by:
      getAsUser in class AbstractChatMessageParams
      Returns:
      The value of the asUser attribute
    • getIconEmoji

      public Optional<String> getIconEmoji()
      Specified by:
      getIconEmoji in class AbstractChatMessageParams
      Returns:
      The value of the iconEmoji attribute
    • getIconUrl

      public Optional<String> getIconUrl()
      Specified by:
      getIconUrl in class AbstractChatMessageParams
      Returns:
      The value of the iconUrl attribute
    • getLinkNames

      public Optional<Boolean> getLinkNames()
      Specified by:
      getLinkNames in class AbstractChatMessageParams
      Returns:
      The value of the linkNames attribute
    • getUnfurlLinks

      public Optional<Boolean> getUnfurlLinks()
      Specified by:
      getUnfurlLinks in class AbstractChatMessageParams
      Returns:
      The value of the unfurlLinks attribute
    • getUnfurlMedia

      public Optional<Boolean> getUnfurlMedia()
      Specified by:
      getUnfurlMedia in class AbstractChatMessageParams
      Returns:
      The value of the unfurlMedia attribute
    • getReplyBroadcast

      public Optional<Boolean> getReplyBroadcast()
      Specified by:
      getReplyBroadcast in class AbstractChatMessageParams
      Returns:
      The value of the replyBroadcast attribute
    • getResponseType

      public TopLevelMessageResponseType getResponseType()
      Overrides:
      getResponseType in class AbstractSlashCommandResponseParams
      Returns:
      The value of the responseType attribute
    • withAttachments

      public final SlashCommandResponseParams 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 SlashCommandResponseParams 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 SlashCommandResponseParams 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 SlashCommandResponseParams 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 SlashCommandResponseParams 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 SlashCommandResponseParams 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 SlashCommandResponseParams 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
    • withThreadTs

      public final SlashCommandResponseParams 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 SlashCommandResponseParams 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
    • withUsername

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

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

      public final SlashCommandResponseParams 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 SlashCommandResponseParams 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
    • withIconEmoji

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

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

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

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

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

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

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

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

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

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

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

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

      public final SlashCommandResponseParams withResponseType(TopLevelMessageResponseType value)
      Copy the current immutable object by setting a value for the responseType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for responseType
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of SlashCommandResponseParams 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, threadTs, username, asUser, iconEmoji, iconUrl, linkNames, unfurlLinks, unfurlMedia, replyBroadcast, responseType.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static SlashCommandResponseParams.Builder builder()
      Creates a builder for SlashCommandResponseParams.
       SlashCommandResponseParams.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
          .setThreadTs(Optional<String>) // optional threadTs
          .setUsername(Optional<String>) // optional username
          .setAsUser(Optional<Boolean>) // optional asUser
          .setIconEmoji(Optional<String>) // optional iconEmoji
          .setIconUrl(Optional<String>) // optional iconUrl
          .setLinkNames(Optional<Boolean>) // optional linkNames
          .setUnfurlLinks(Optional<Boolean>) // optional unfurlLinks
          .setUnfurlMedia(Optional<Boolean>) // optional unfurlMedia
          .setReplyBroadcast(Optional<Boolean>) // optional replyBroadcast
          .setResponseType(com.hubspot.slack.client.models.TopLevelMessageResponseType) // optional responseType
          .build();
       
      Returns:
      A new SlashCommandResponseParams builder