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().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic DialogSubmission.Builderbuilder()Creates a builder forDialogSubmission.static DialogSubmissioncopyOf(DialogSubmissionIF instance) Creates an immutable copy of aDialogSubmissionIFvalue.booleanThis instance is equal to all instances ofDialogSubmissionthat have equal attribute values.getState()This state is passed from the dialog creation and is echoed back from the user submission.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.getTeam()getToken()getType()getUser()inthashCode()Computes a hash code from attributes:type,callbackId,actionTs,token,team,user,channel,submission,state.toString()Prints the immutable valueDialogSubmissionwith attribute values.final DialogSubmissionwithActionTs(String value) Copy the current immutable object by setting a value for theactionTsattribute.final DialogSubmissionwithCallbackId(String value) Copy the current immutable object by setting a value for thecallbackIdattribute.final DialogSubmissionwithChannel(SlackChannel value) Copy the current immutable object by setting a value for thechannelattribute.final DialogSubmissionCopy the current immutable object by setting a present value for the optionalstateattribute.final DialogSubmissionCopy the current immutable object by setting an optional value for thestateattribute.final DialogSubmissionwithSubmission(Map<String, ? extends Optional<String>> entries) Copy the current immutable object by replacing thesubmissionmap with the specified map.final DialogSubmissionCopy the current immutable object by setting a value for theteamattribute.final DialogSubmissionCopy the current immutable object by setting a value for thetokenattribute.final DialogSubmissionwithType(InteractiveCallbackType value) Copy the current immutable object by setting a value for thetypeattribute.final DialogSubmissionwithUser(SlackUserLite value) Copy the current immutable object by setting a value for theuserattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceSlackInteractiveCallback- Returns:
- The value of the
typeattribute
-
getCallbackId
- Specified by:
getCallbackIdin interfaceSlackInteractiveCallback- Returns:
- The value of the
callbackIdattribute
-
getActionTs
- Specified by:
getActionTsin interfaceSlackInteractiveCallback- Returns:
- The value of the
actionTsattribute
-
getToken
- Specified by:
getTokenin interfaceSlackInteractiveCallback- Returns:
- The value of the
tokenattribute
-
getTeam
- Specified by:
getTeamin interfaceSlackInteractiveCallback- Returns:
- The value of the
teamattribute
-
getUser
- Specified by:
getUserin interfaceSlackInteractiveCallback- Returns:
- The value of the
userattribute
-
getChannel
- Specified by:
getChannelin interfaceSlackInteractiveCallback- Returns:
- The value of the
channelattribute
-
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:
getSubmissionin interfaceDialogSubmissionIF
-
getState
This state is passed from the dialog creation and is echoed back from the user submission.- Specified by:
getStatein interfaceDialogSubmissionIF
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy or the
thisobject
-
withCallbackId
Copy the current immutable object by setting a value for thecallbackIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for callbackId- Returns:
- A modified copy or the
thisobject
-
withActionTs
Copy the current immutable object by setting a value for theactionTsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for actionTs- Returns:
- A modified copy or the
thisobject
-
withToken
Copy the current immutable object by setting a value for thetokenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for token- Returns:
- A modified copy or the
thisobject
-
withTeam
Copy the current immutable object by setting a value for theteamattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for team- Returns:
- A modified copy or the
thisobject
-
withUser
Copy the current immutable object by setting a value for theuserattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for user- Returns:
- A modified copy or the
thisobject
-
withChannel
Copy the current immutable object by setting a value for thechannelattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for channel- Returns:
- A modified copy or the
thisobject
-
withSubmission
Copy the current immutable object by replacing thesubmissionmap 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 returningthis.- Parameters:
entries- The entries to replace the submission map- Returns:
- A modified copy or
thisif not changed
-
withState
Copy the current immutable object by setting a present value for the optionalstateattribute.- Parameters:
value- The value for state,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withState
Copy the current immutable object by setting an optional value for thestateattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for state- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofDialogSubmissionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,callbackId,actionTs,token,team,user,channel,submission,state. -
toString
Prints the immutable valueDialogSubmissionwith attribute values. -
copyOf
Creates an immutable copy of aDialogSubmissionIFvalue. 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
Creates a builder forDialogSubmission.DialogSubmission.builder() .setType(com.hubspot.slack.client.models.interaction.InteractiveCallbackType) // requiredtype.setCallbackId(String) // requiredcallbackId.setActionTs(String) // requiredactionTs.setToken(String) // requiredtoken.setTeam(com.hubspot.slack.client.models.teams.SlackTeam) // requiredteam.setUser(com.hubspot.slack.client.models.users.SlackUserLite) // requireduser.setChannel(com.hubspot.slack.client.models.SlackChannel) // requiredchannel.putSubmission|putAllSubmission(String => Optional<String>) //submissionmappings .setState(Optional<String>) // optionalstate.build();- Returns:
- A new DialogSubmission builder
-