Class MessageAction

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

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

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

  • Method Details

    • getType

      public InteractiveCallbackType getType()
      Specified by:
      getType in interface SlackInteractiveCallback
      Returns:
      The value of the type 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
    • getActionTs

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

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

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

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

      public LiteMessage getMessage()
      Specified by:
      getMessage in interface MessageActionIF
      Returns:
      The value of the message attribute
    • withType

      public final MessageAction 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
    • withToken

      public final MessageAction 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 MessageAction 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 MessageAction 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 MessageAction 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
    • withActionTs

      public final MessageAction 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
    • withCallbackId

      public final MessageAction 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
    • withTriggerId

      public final MessageAction 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
    • withResponseUrl

      public final MessageAction 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
    • withMessage

      public final MessageAction withMessage(LiteMessage value)
      Copy the current immutable object by setting a value for the message attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for message
      Returns:
      A modified copy or the this object
    • equals

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

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

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

      public static MessageAction.Builder builder()
      Creates a builder for MessageAction.
       MessageAction.builder()
          .setType(com.hubspot.slack.client.models.interaction.InteractiveCallbackType) // required type
          .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
          .setActionTs(String) // required actionTs
          .setCallbackId(String) // required callbackId
          .setTriggerId(String) // required triggerId
          .setResponseUrl(String) // required responseUrl
          .setMessage(com.hubspot.slack.client.models.LiteMessage) // required message
          .build();
       
      Returns:
      A new MessageAction builder