Class BlockActions

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

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

Use the builder to create immutable instances: BlockActions.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
    • getTriggerId

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

      public Optional<String> getResponseUrl()
      Specified by:
      getResponseUrl in interface BlockActionsIF
      Returns:
      The value of the responseUrl attribute
    • getMessage

      public Optional<LiteMessage> getMessage()
      Specified by:
      getMessage in interface BlockActionsIF
      Returns:
      The value of the message attribute
    • getView

      public Optional<ViewResponseBase> getView()
      Specified by:
      getView in interface BlockActionsIF
      Returns:
      The value of the view attribute
    • getElementActions

      public List<BlockElementAction> getElementActions()
      Specified by:
      getElementActions in interface BlockActionsIF
      Returns:
      The value of the elementActions attribute
    • getState

      public Optional<StateValuesPayload> getState()
      Specified by:
      getState in interface BlockActionsIF
      Returns:
      The value of the state attribute
    • getContainer

      public Optional<Container> getContainer()
      Specified by:
      getContainer in interface BlockActionsIF
      Returns:
      The value of the container attribute
    • withType

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

      public final BlockActions 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 BlockActions withResponseUrl(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional responseUrl attribute.
      Parameters:
      value - The value for responseUrl, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withResponseUrl

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

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

      public final BlockActions withMessage(Optional<? extends LiteMessage> optional)
      Copy the current immutable object by setting an optional value for the message 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 message
      Returns:
      A modified copy or this if not changed
    • withView

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

      public final BlockActions withView(Optional<? extends ViewResponseBase> optional)
      Copy the current immutable object by setting an optional value for the view 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 view
      Returns:
      A modified copy or this if not changed
    • withElementActions

      public final BlockActions withElementActions(BlockElementAction... elements)
      Copy the current immutable object with elements that replace the content of elementActions.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withElementActions

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

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

      public final BlockActions withState(Optional<? extends StateValuesPayload> optional)
      Copy the current immutable object by setting an optional value for the state 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 state
      Returns:
      A modified copy or this if not changed
    • withContainer

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

      public final BlockActions withContainer(Optional<? extends Container> optional)
      Copy the current immutable object by setting an optional value for the container 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 container
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of BlockActions 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, triggerId, responseUrl, message, view, elementActions, state, container.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static BlockActions.Builder builder()
      Creates a builder for BlockActions.
       BlockActions.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
          .setTriggerId(String) // required triggerId
          .setResponseUrl(Optional<String>) // optional responseUrl
          .setMessage(Optional<com.hubspot.slack.client.models.LiteMessage>) // optional message
          .setView(Optional<com.hubspot.slack.client.models.response.views.ViewResponseBase>) // optional view
          .addElementActions|addAllElementActions(BlockElementAction) // elementActions elements
          .setState(Optional<StateValuesPayload>) // optional state
          .setContainer(Optional<com.hubspot.slack.client.models.interaction.Container>) // optional container
          .build();
       
      Returns:
      A new BlockActions builder