Class TopLevelMessageInteractionResponse

java.lang.Object
com.hubspot.slack.client.models.interaction.TopLevelMessageInteractionResponse
All Implemented Interfaces:
TopLevelMessageInteractionResponseIF

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

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

  • Method Details

    • getResponseType

      public TopLevelMessageResponseType getResponseType()
      Specified by:
      getResponseType in interface TopLevelMessageInteractionResponseIF
      Returns:
      The value of the responseType attribute
    • getReplaceOriginal

      public boolean getReplaceOriginal()
      Specified by:
      getReplaceOriginal in interface TopLevelMessageInteractionResponseIF
      Returns:
      The value of the replaceOriginal attribute
    • getDeleteOriginal

      public boolean getDeleteOriginal()
      Specified by:
      getDeleteOriginal in interface TopLevelMessageInteractionResponseIF
      Returns:
      The value of the deleteOriginal attribute
    • getText

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

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

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

      public final TopLevelMessageInteractionResponse 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
    • withReplaceOriginal

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of TopLevelMessageInteractionResponse 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: responseType, replaceOriginal, deleteOriginal, text, attachments, blocks.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      Creates a builder for TopLevelMessageInteractionResponse.
       TopLevelMessageInteractionResponse.builder()
          .setResponseType(com.hubspot.slack.client.models.TopLevelMessageResponseType) // required responseType
          .setReplaceOriginal(boolean) // required replaceOriginal
          .setDeleteOriginal(boolean) // optional deleteOriginal
          .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
          .build();
       
      Returns:
      A new TopLevelMessageInteractionResponse builder