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().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic InteractiveAction.Builderbuilder()Creates a builder forInteractiveAction.static InteractiveActioncopyOf(InteractiveActionIF instance) Creates an immutable copy of aInteractiveActionIFvalue.booleanThis instance is equal to all instances ofInteractiveActionthat have equal attribute values.intgetTeam()getToken()getType()getUser()inthashCode()Computes a hash code from attributes:type,callbackId,actionTs,token,team,user,channel,actions,messageTs,attachmentId,appUnfurl,originalMessage,responseUrl,triggerId.booleantoString()Prints the immutable valueInteractiveActionwith attribute values.final InteractiveActionwithActions(Action... elements) Copy the current immutable object with elements that replace the content ofactions.final InteractiveActionwithActions(Iterable<? extends Action> elements) Copy the current immutable object with elements that replace the content ofactions.final InteractiveActionwithActionTs(String value) Copy the current immutable object by setting a value for theactionTsattribute.final InteractiveActionwithAppUnfurl(boolean value) Copy the current immutable object by setting a value for theappUnfurlattribute.final InteractiveActionwithAttachmentId(int value) Copy the current immutable object by setting a value for theattachmentIdattribute.final InteractiveActionwithCallbackId(String value) Copy the current immutable object by setting a value for thecallbackIdattribute.final InteractiveActionwithChannel(SlackChannel value) Copy the current immutable object by setting a value for thechannelattribute.final InteractiveActionwithMessageTs(String value) Copy the current immutable object by setting a value for themessageTsattribute.final InteractiveActionwithOriginalMessage(LiteMessage value) Copy the current immutable object by setting a present value for the optionaloriginalMessageattribute.final InteractiveActionwithOriginalMessage(Optional<? extends LiteMessage> optional) Copy the current immutable object by setting an optional value for theoriginalMessageattribute.final InteractiveActionwithResponseUrl(String value) Copy the current immutable object by setting a value for theresponseUrlattribute.final InteractiveActionCopy the current immutable object by setting a value for theteamattribute.final InteractiveActionCopy the current immutable object by setting a value for thetokenattribute.final InteractiveActionwithTriggerId(String value) Copy the current immutable object by setting a value for thetriggerIdattribute.final InteractiveActionwithType(InteractiveCallbackType value) Copy the current immutable object by setting a value for thetypeattribute.final InteractiveActionwithUser(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
-
getActions
- Specified by:
getActionsin interfaceInteractiveActionIF- Returns:
- The value of the
actionsattribute
-
getMessageTs
- Specified by:
getMessageTsin interfaceInteractiveActionIF- Returns:
- The value of the
messageTsattribute
-
getAttachmentId
public int getAttachmentId()- Specified by:
getAttachmentIdin interfaceInteractiveActionIF- Returns:
- The value of the
attachmentIdattribute
-
isAppUnfurl
public boolean isAppUnfurl()- Specified by:
isAppUnfurlin interfaceInteractiveActionIF- Returns:
- The value of the
appUnfurlattribute
-
getOriginalMessage
- Specified by:
getOriginalMessagein interfaceInteractiveActionIF- Returns:
- The value of the
originalMessageattribute
-
getResponseUrl
- Specified by:
getResponseUrlin interfaceInteractiveActionIF- Returns:
- The value of the
responseUrlattribute
-
getTriggerId
- Specified by:
getTriggerIdin interfaceInteractiveActionIF- Returns:
- The value of the
triggerIdattribute
-
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
-
withActions
Copy the current immutable object with elements that replace the content ofactions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withActions
Copy the current immutable object with elements that replace the content ofactions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of actions elements to set- Returns:
- A modified copy or
thisif not changed
-
withMessageTs
Copy the current immutable object by setting a value for themessageTsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for messageTs- Returns:
- A modified copy or the
thisobject
-
withAttachmentId
Copy the current immutable object by setting a value for theattachmentIdattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for attachmentId- Returns:
- A modified copy or the
thisobject
-
withAppUnfurl
Copy the current immutable object by setting a value for theappUnfurlattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for appUnfurl- Returns:
- A modified copy or the
thisobject
-
withOriginalMessage
Copy the current immutable object by setting a present value for the optionaloriginalMessageattribute.- Parameters:
value- The value for originalMessage,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withOriginalMessage
Copy the current immutable object by setting an optional value for theoriginalMessageattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for originalMessage- Returns:
- A modified copy or
thisif not changed
-
withResponseUrl
Copy the current immutable object by setting a value for theresponseUrlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for responseUrl- Returns:
- A modified copy or the
thisobject
-
withTriggerId
Copy the current immutable object by setting a value for thetriggerIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for triggerId- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofInteractiveActionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,callbackId,actionTs,token,team,user,channel,actions,messageTs,attachmentId,appUnfurl,originalMessage,responseUrl,triggerId. -
toString
Prints the immutable valueInteractiveActionwith attribute values. -
copyOf
Creates an immutable copy of aInteractiveActionIFvalue. 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
Creates a builder forInteractiveAction.InteractiveAction.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.addActions|addAllActions(com.hubspot.slack.client.models.actions.Action) //actionselements .setMessageTs(String) // requiredmessageTs.setAttachmentId(int) // requiredattachmentId.setAppUnfurl(boolean) // requiredappUnfurl.setOriginalMessage(Optional<com.hubspot.slack.client.models.LiteMessage>) // optionaloriginalMessage.setResponseUrl(String) // requiredresponseUrl.setTriggerId(String) // requiredtriggerId.build();- Returns:
- A new InteractiveAction builder
-