@NotThreadSafe public static final class InteractiveAction.Builder extends Object
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.
| Modifier and Type | Method and Description |
|---|---|
InteractiveAction.Builder |
addActions(Action... elements)
Adds elements to
actions list. |
InteractiveAction.Builder |
addActions(Action element)
Adds one element to
actions list. |
InteractiveAction.Builder |
addAllActions(Iterable<? extends Action> elements)
Adds elements to
actions list. |
InteractiveAction |
build()
Builds a new
InteractiveAction. |
InteractiveAction.Builder |
from(InteractiveActionIF instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.interaction.InteractiveActionIF instance. |
InteractiveAction.Builder |
from(SlackInteractiveCallback instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.interaction.SlackInteractiveCallback instance. |
InteractiveAction.Builder |
setActions(Iterable<? extends Action> elements)
Sets or replaces all elements for
actions list. |
InteractiveAction.Builder |
setActionTs(String actionTs)
Initializes the value for the
actionTs attribute. |
InteractiveAction.Builder |
setAppUnfurl(boolean appUnfurl)
Initializes the value for the
appUnfurl attribute. |
InteractiveAction.Builder |
setAttachmentId(int attachmentId)
Initializes the value for the
attachmentId attribute. |
InteractiveAction.Builder |
setCallbackId(String callbackId)
Initializes the value for the
callbackId attribute. |
InteractiveAction.Builder |
setChannel(SlackChannel channel)
Initializes the value for the
channel attribute. |
InteractiveAction.Builder |
setMessageTs(String messageTs)
Initializes the value for the
messageTs attribute. |
InteractiveAction.Builder |
setOriginalMessage(LiteMessage originalMessage)
Initializes the optional value
originalMessage to originalMessage. |
InteractiveAction.Builder |
setOriginalMessage(Optional<LiteMessage> originalMessage)
Initializes the optional value
originalMessage to originalMessage. |
InteractiveAction.Builder |
setResponseUrl(String responseUrl)
Initializes the value for the
responseUrl attribute. |
InteractiveAction.Builder |
setTeam(SlackTeam team)
Initializes the value for the
team attribute. |
InteractiveAction.Builder |
setToken(String token)
Initializes the value for the
token attribute. |
InteractiveAction.Builder |
setTriggerId(String triggerId)
Initializes the value for the
triggerId attribute. |
InteractiveAction.Builder |
setType(InteractiveCallbackType type)
Initializes the value for the
type attribute. |
InteractiveAction.Builder |
setUser(SlackUserLite user)
Initializes the value for the
user attribute. |
public final InteractiveAction.Builder from(SlackInteractiveCallback instance)
com.hubspot.slack.client.models.interaction.SlackInteractiveCallback instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final InteractiveAction.Builder from(InteractiveActionIF instance)
com.hubspot.slack.client.models.interaction.InteractiveActionIF instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final InteractiveAction.Builder addActions(Action element)
actions list.element - A actions elementthis builder for use in a chained invocationpublic final InteractiveAction.Builder addActions(Action... elements)
actions list.elements - An array of actions elementsthis builder for use in a chained invocationpublic final InteractiveAction.Builder setActions(Iterable<? extends Action> elements)
actions list.elements - An iterable of actions elementsthis builder for use in a chained invocationpublic final InteractiveAction.Builder addAllActions(Iterable<? extends Action> elements)
actions list.elements - An iterable of actions elementsthis builder for use in a chained invocationpublic final InteractiveAction.Builder setMessageTs(String messageTs)
messageTs attribute.messageTs - The value for messageTsthis builder for use in a chained invocationpublic final InteractiveAction.Builder setAttachmentId(int attachmentId)
attachmentId attribute.attachmentId - The value for attachmentIdthis builder for use in a chained invocationpublic final InteractiveAction.Builder setAppUnfurl(boolean appUnfurl)
appUnfurl attribute.appUnfurl - The value for appUnfurlthis builder for use in a chained invocationpublic final InteractiveAction.Builder setOriginalMessage(@Nullable LiteMessage originalMessage)
originalMessage to originalMessage.originalMessage - The value for originalMessage, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final InteractiveAction.Builder setOriginalMessage(Optional<LiteMessage> originalMessage)
originalMessage to originalMessage.originalMessage - The value for originalMessagethis builder for use in a chained invocationpublic final InteractiveAction.Builder setResponseUrl(String responseUrl)
responseUrl attribute.responseUrl - The value for responseUrlthis builder for use in a chained invocationpublic final InteractiveAction.Builder setTriggerId(String triggerId)
triggerId attribute.triggerId - The value for triggerIdthis builder for use in a chained invocationpublic final InteractiveAction.Builder setType(InteractiveCallbackType type)
type attribute.type - The value for typethis builder for use in a chained invocationpublic final InteractiveAction.Builder setCallbackId(String callbackId)
callbackId attribute.callbackId - The value for callbackIdthis builder for use in a chained invocationpublic final InteractiveAction.Builder setActionTs(String actionTs)
actionTs attribute.actionTs - The value for actionTsthis builder for use in a chained invocationpublic final InteractiveAction.Builder setToken(String token)
token attribute.token - The value for tokenthis builder for use in a chained invocationpublic final InteractiveAction.Builder setTeam(SlackTeam team)
team attribute.team - The value for teamthis builder for use in a chained invocationpublic final InteractiveAction.Builder setChannel(SlackChannel channel)
channel attribute.channel - The value for channelthis builder for use in a chained invocationpublic final InteractiveAction.Builder setUser(SlackUserLite user)
user attribute.user - The value for userthis builder for use in a chained invocationpublic InteractiveAction build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
InteractiveAction.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.