Class InteractiveAction

java.lang.Object
com.hubspot.slack.client.models.interaction.InteractiveAction
All Implemented Interfaces:
InteractiveActionIF, SlackInteractiveCallback

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

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

  • Method Details

    • getType

      public InteractiveCallbackType getType()
      Specified by:
      getType in interface SlackInteractiveCallback
      Returns:
      The value of the type attribute
    • getCallbackId

      public String getCallbackId()
      Specified by:
      getCallbackId in interface SlackInteractiveCallback
      Returns:
      The value of the callbackId attribute
    • getActionTs

      public String getActionTs()
      Specified by:
      getActionTs in interface SlackInteractiveCallback
      Returns:
      The value of the actionTs attribute
    • getToken

      public String getToken()
      Specified by:
      getToken in interface SlackInteractiveCallback
      Returns:
      The value of the token attribute
    • getTeam

      public SlackTeam getTeam()
      Specified by:
      getTeam in interface SlackInteractiveCallback
      Returns:
      The value of the team attribute
    • getUser

      public SlackUserLite getUser()
      Specified by:
      getUser in interface SlackInteractiveCallback
      Returns:
      The value of the user attribute
    • getChannel

      public SlackChannel getChannel()
      Specified by:
      getChannel in interface SlackInteractiveCallback
      Returns:
      The value of the channel attribute
    • getActions

      public List<Action> getActions()
      Specified by:
      getActions in interface InteractiveActionIF
      Returns:
      The value of the actions attribute
    • getMessageTs

      public String getMessageTs()
      Specified by:
      getMessageTs in interface InteractiveActionIF
      Returns:
      The value of the messageTs attribute
    • getAttachmentId

      public int getAttachmentId()
      Specified by:
      getAttachmentId in interface InteractiveActionIF
      Returns:
      The value of the attachmentId attribute
    • isAppUnfurl

      public boolean isAppUnfurl()
      Specified by:
      isAppUnfurl in interface InteractiveActionIF
      Returns:
      The value of the appUnfurl attribute
    • getOriginalMessage

      public Optional<LiteMessage> getOriginalMessage()
      Specified by:
      getOriginalMessage in interface InteractiveActionIF
      Returns:
      The value of the originalMessage attribute
    • getResponseUrl

      public String getResponseUrl()
      Specified by:
      getResponseUrl in interface InteractiveActionIF
      Returns:
      The value of the responseUrl attribute
    • getTriggerId

      public String getTriggerId()
      Specified by:
      getTriggerId in interface InteractiveActionIF
      Returns:
      The value of the triggerId attribute
    • withType

      public final InteractiveAction withType(InteractiveCallbackType value)
      Copy the current immutable object by setting a value for the type attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy or the this object
    • withCallbackId

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

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

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

      public final InteractiveAction withTeam(SlackTeam value)
      Copy the current immutable object by setting a value for the team attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for team
      Returns:
      A modified copy or the this object
    • withUser

      public final InteractiveAction withUser(SlackUserLite value)
      Copy the current immutable object by setting a value for the user attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for user
      Returns:
      A modified copy or the this object
    • withChannel

      public final InteractiveAction withChannel(SlackChannel value)
      Copy the current immutable object by setting a value for the channel attribute. A shallow reference equality check is 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
    • withActions

      public final InteractiveAction withActions(Action... elements)
      Copy the current immutable object with elements that replace the content of actions.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withActions

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

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

      public final InteractiveAction withAttachmentId(int value)
      Copy the current immutable object by setting a value for the attachmentId attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for attachmentId
      Returns:
      A modified copy or the this object
    • withAppUnfurl

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

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

      public final InteractiveAction withOriginalMessage(Optional<? extends LiteMessage> optional)
      Copy the current immutable object by setting an optional value for the originalMessage attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for originalMessage
      Returns:
      A modified copy or this if not changed
    • withResponseUrl

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of InteractiveAction 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: type, callbackId, actionTs, token, team, user, channel, actions, messageTs, attachmentId, appUnfurl, originalMessage, responseUrl, triggerId.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static InteractiveAction.Builder builder()
      Creates a builder for InteractiveAction.
       InteractiveAction.builder()
          .setType(com.hubspot.slack.client.models.interaction.InteractiveCallbackType) // required type
          .setCallbackId(String) // required callbackId
          .setActionTs(String) // required actionTs
          .setToken(String) // required token
          .setTeam(com.hubspot.slack.client.models.teams.SlackTeam) // required team
          .setUser(com.hubspot.slack.client.models.users.SlackUserLite) // required user
          .setChannel(com.hubspot.slack.client.models.SlackChannel) // required channel
          .addActions|addAllActions(com.hubspot.slack.client.models.actions.Action) // actions elements
          .setMessageTs(String) // required messageTs
          .setAttachmentId(int) // required attachmentId
          .setAppUnfurl(boolean) // required appUnfurl
          .setOriginalMessage(Optional<com.hubspot.slack.client.models.LiteMessage>) // optional originalMessage
          .setResponseUrl(String) // required responseUrl
          .setTriggerId(String) // required triggerId
          .build();
       
      Returns:
      A new InteractiveAction builder