Class DialogSubmission

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

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

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

      public Map<String,Optional<String>> getSubmission()
      This map is a key:value mapping of the values the user submitted to the dialog, where the keys are the field names used when creating the dialog.
      Specified by:
      getSubmission in interface DialogSubmissionIF
    • getState

      public Optional<String> getState()
      This state is passed from the dialog creation and is echoed back from the user submission.
      Specified by:
      getState in interface DialogSubmissionIF
    • withType

      public final DialogSubmission 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 DialogSubmission 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 DialogSubmission 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 DialogSubmission 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 DialogSubmission 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 DialogSubmission 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 DialogSubmission 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
    • withSubmission

      public final DialogSubmission withSubmission(Map<String,? extends Optional<String>> entries)
      Copy the current immutable object by replacing the submission map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to replace the submission map
      Returns:
      A modified copy or this if not changed
    • withState

      public final DialogSubmission withState(@Nullable String 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 DialogSubmission withState(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the state 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 state
      Returns:
      A modified copy or this if not changed
    • equals

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

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

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

      public static DialogSubmission.Builder builder()
      Creates a builder for DialogSubmission.
       DialogSubmission.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
          .putSubmission|putAllSubmission(String => Optional<String>) // submission mappings
          .setState(Optional<String>) // optional state
          .build();
       
      Returns:
      A new DialogSubmission builder