Class InteractiveAction.Builder
java.lang.Object
com.hubspot.slack.client.models.interaction.InteractiveAction.Builder
- Enclosing class:
InteractiveAction
@Generated(from="InteractiveActionIF",
generator="Immutables")
@NotThreadSafe
public static final class InteractiveAction.Builder
extends Object
Builds instances of type
InteractiveAction.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddActions(Action element) Adds one element toactionslist.addActions(Action... elements) Adds elements toactionslist.addAllActions(Iterable<? extends Action> elements) Adds elements toactionslist.build()Builds a newInteractiveAction.from(InteractiveActionIF instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.interaction.InteractiveActionIFinstance.from(SlackInteractiveCallback instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.interaction.SlackInteractiveCallbackinstance.setActions(Iterable<? extends Action> elements) Sets or replaces all elements foractionslist.setActionTs(String actionTs) Initializes the value for theactionTsattribute.setAppUnfurl(boolean appUnfurl) Initializes the value for theappUnfurlattribute.setAttachmentId(int attachmentId) Initializes the value for theattachmentIdattribute.setCallbackId(String callbackId) Initializes the value for thecallbackIdattribute.setChannel(SlackChannel channel) Initializes the value for thechannelattribute.setMessageTs(String messageTs) Initializes the value for themessageTsattribute.setOriginalMessage(LiteMessage originalMessage) Initializes the optional valueoriginalMessageto originalMessage.setOriginalMessage(Optional<? extends LiteMessage> originalMessage) Initializes the optional valueoriginalMessageto originalMessage.setResponseUrl(String responseUrl) Initializes the value for theresponseUrlattribute.Initializes the value for theteamattribute.Initializes the value for thetokenattribute.setTriggerId(String triggerId) Initializes the value for thetriggerIdattribute.Initializes the value for thetypeattribute.setUser(SlackUserLite user) Initializes the value for theuserattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.interaction.InteractiveActionIFinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.interaction.SlackInteractiveCallbackinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setType
Initializes the value for thetypeattribute.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
setCallbackId
Initializes the value for thecallbackIdattribute.- Parameters:
callbackId- The value for callbackId- Returns:
thisbuilder for use in a chained invocation
-
setActionTs
Initializes the value for theactionTsattribute.- Parameters:
actionTs- The value for actionTs- Returns:
thisbuilder for use in a chained invocation
-
setToken
Initializes the value for thetokenattribute.- Parameters:
token- The value for token- Returns:
thisbuilder for use in a chained invocation
-
setTeam
Initializes the value for theteamattribute.- Parameters:
team- The value for team- Returns:
thisbuilder for use in a chained invocation
-
setUser
Initializes the value for theuserattribute.- Parameters:
user- The value for user- Returns:
thisbuilder for use in a chained invocation
-
setChannel
Initializes the value for thechannelattribute.- Parameters:
channel- The value for channel- Returns:
thisbuilder for use in a chained invocation
-
addActions
Adds one element toactionslist.- Parameters:
element- A actions element- Returns:
thisbuilder for use in a chained invocation
-
addActions
Adds elements toactionslist.- Parameters:
elements- An array of actions elements- Returns:
thisbuilder for use in a chained invocation
-
setActions
Sets or replaces all elements foractionslist.- Parameters:
elements- An iterable of actions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllActions
Adds elements toactionslist.- Parameters:
elements- An iterable of actions elements- Returns:
thisbuilder for use in a chained invocation
-
setMessageTs
Initializes the value for themessageTsattribute.- Parameters:
messageTs- The value for messageTs- Returns:
thisbuilder for use in a chained invocation
-
setAttachmentId
Initializes the value for theattachmentIdattribute.- Parameters:
attachmentId- The value for attachmentId- Returns:
thisbuilder for use in a chained invocation
-
setAppUnfurl
Initializes the value for theappUnfurlattribute.- Parameters:
appUnfurl- The value for appUnfurl- Returns:
thisbuilder for use in a chained invocation
-
setOriginalMessage
Initializes the optional valueoriginalMessageto originalMessage.- Parameters:
originalMessage- The value for originalMessage,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setOriginalMessage
public final InteractiveAction.Builder setOriginalMessage(Optional<? extends LiteMessage> originalMessage) Initializes the optional valueoriginalMessageto originalMessage.- Parameters:
originalMessage- The value for originalMessage- Returns:
thisbuilder for use in a chained invocation
-
setResponseUrl
Initializes the value for theresponseUrlattribute.- Parameters:
responseUrl- The value for responseUrl- Returns:
thisbuilder for use in a chained invocation
-
setTriggerId
Initializes the value for thetriggerIdattribute.- Parameters:
triggerId- The value for triggerId- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newInteractiveAction.- Returns:
- An immutable instance of InteractiveAction
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-