@NotThreadSafe public static final class BlockActions.Builder extends Object
BlockActions.
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 |
|---|---|
BlockActions.Builder |
addAllElementActions(Iterable<? extends BlockElementAction> elements)
Adds elements to
elementActions list. |
BlockActions.Builder |
addElementActions(BlockElementAction... elements)
Adds elements to
elementActions list. |
BlockActions.Builder |
addElementActions(BlockElementAction element)
Adds one element to
elementActions list. |
BlockActions |
build()
Builds a new
BlockActions. |
BlockActions.Builder |
from(BlockActionsIF instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.interaction.BlockActionsIF instance. |
BlockActions.Builder |
from(SlackInteractiveCallback instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.interaction.SlackInteractiveCallback instance. |
BlockActions.Builder |
setElementActions(Iterable<? extends BlockElementAction> elements)
Sets or replaces all elements for
elementActions list. |
BlockActions.Builder |
setMessage(LiteMessage message)
Initializes the optional value
message to message. |
BlockActions.Builder |
setMessage(Optional<LiteMessage> message)
Initializes the optional value
message to message. |
BlockActions.Builder |
setResponseUrl(Optional<String> responseUrl)
Initializes the optional value
responseUrl to responseUrl. |
BlockActions.Builder |
setResponseUrl(String responseUrl)
Initializes the optional value
responseUrl to responseUrl. |
BlockActions.Builder |
setTeam(SlackTeam team)
Initializes the value for the
team attribute. |
BlockActions.Builder |
setToken(String token)
Initializes the value for the
token attribute. |
BlockActions.Builder |
setTriggerId(String triggerId)
Initializes the value for the
triggerId attribute. |
BlockActions.Builder |
setType(InteractiveCallbackType type)
Initializes the value for the
type attribute. |
BlockActions.Builder |
setUser(SlackUserLite user)
Initializes the value for the
user attribute. |
BlockActions.Builder |
setView(Optional<ViewResponseBase> view)
Initializes the optional value
view to view. |
BlockActions.Builder |
setView(ViewResponseBase view)
Initializes the optional value
view to view. |
public final BlockActions.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 BlockActions.Builder from(BlockActionsIF instance)
com.hubspot.slack.client.models.interaction.BlockActionsIF instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final BlockActions.Builder setTriggerId(String triggerId)
triggerId attribute.triggerId - The value for triggerIdthis builder for use in a chained invocationpublic final BlockActions.Builder setResponseUrl(@Nullable String responseUrl)
responseUrl to responseUrl.responseUrl - The value for responseUrl, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final BlockActions.Builder setResponseUrl(Optional<String> responseUrl)
responseUrl to responseUrl.responseUrl - The value for responseUrlthis builder for use in a chained invocationpublic final BlockActions.Builder setMessage(@Nullable LiteMessage message)
message to message.message - The value for message, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final BlockActions.Builder setMessage(Optional<LiteMessage> message)
message to message.message - The value for messagethis builder for use in a chained invocationpublic final BlockActions.Builder setView(@Nullable ViewResponseBase view)
view to view.view - The value for view, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final BlockActions.Builder setView(Optional<ViewResponseBase> view)
view to view.view - The value for viewthis builder for use in a chained invocationpublic final BlockActions.Builder addElementActions(BlockElementAction element)
elementActions list.element - A elementActions elementthis builder for use in a chained invocationpublic final BlockActions.Builder addElementActions(BlockElementAction... elements)
elementActions list.elements - An array of elementActions elementsthis builder for use in a chained invocationpublic final BlockActions.Builder setElementActions(Iterable<? extends BlockElementAction> elements)
elementActions list.elements - An iterable of elementActions elementsthis builder for use in a chained invocationpublic final BlockActions.Builder addAllElementActions(Iterable<? extends BlockElementAction> elements)
elementActions list.elements - An iterable of elementActions elementsthis builder for use in a chained invocationpublic final BlockActions.Builder setType(InteractiveCallbackType type)
type attribute.type - The value for typethis builder for use in a chained invocationpublic final BlockActions.Builder setToken(String token)
token attribute.token - The value for tokenthis builder for use in a chained invocationpublic final BlockActions.Builder setTeam(SlackTeam team)
team attribute.team - The value for teamthis builder for use in a chained invocationpublic final BlockActions.Builder setUser(SlackUserLite user)
user attribute.user - The value for userthis builder for use in a chained invocationpublic BlockActions build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
BlockActions.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2020. All rights reserved.