Class BlockActions.Builder
java.lang.Object
com.hubspot.slack.client.models.interaction.BlockActions.Builder
- Enclosing class:
BlockActions
@Generated(from="BlockActionsIF",
generator="Immutables")
@NotThreadSafe
public static final class BlockActions.Builder
extends Object
Builds instances of type
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.
-
Method Summary
Modifier and TypeMethodDescriptionfinal BlockActions.BuilderaddAllElementActions(Iterable<? extends BlockElementAction> elements) Adds elements toelementActionslist.final BlockActions.BuilderaddElementActions(BlockElementAction element) Adds one element toelementActionslist.final BlockActions.BuilderaddElementActions(BlockElementAction... elements) Adds elements toelementActionslist.build()Builds a newBlockActions.final BlockActions.Builderfrom(BlockActionsIF instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.interaction.BlockActionsIFinstance.final BlockActions.Builderfrom(SlackInteractiveCallback instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.interaction.SlackInteractiveCallbackinstance.final BlockActions.BuildersetContainer(Container container) Initializes the optional valuecontainerto container.final BlockActions.BuildersetContainer(Optional<? extends Container> container) Initializes the optional valuecontainerto container.final BlockActions.BuildersetElementActions(Iterable<? extends BlockElementAction> elements) Sets or replaces all elements forelementActionslist.final BlockActions.BuildersetMessage(LiteMessage message) Initializes the optional valuemessageto message.final BlockActions.BuildersetMessage(Optional<? extends LiteMessage> message) Initializes the optional valuemessageto message.final BlockActions.BuildersetResponseUrl(String responseUrl) Initializes the optional valueresponseUrlto responseUrl.final BlockActions.BuildersetResponseUrl(Optional<String> responseUrl) Initializes the optional valueresponseUrlto responseUrl.final BlockActions.BuildersetState(StateValuesPayload state) Initializes the optional valuestateto state.final BlockActions.BuildersetState(Optional<? extends StateValuesPayload> state) Initializes the optional valuestateto state.final BlockActions.BuilderInitializes the value for theteamattribute.final BlockActions.BuilderInitializes the value for thetokenattribute.final BlockActions.BuildersetTriggerId(String triggerId) Initializes the value for thetriggerIdattribute.final BlockActions.BuilderInitializes the value for thetypeattribute.final BlockActions.BuildersetUser(SlackUserLite user) Initializes the value for theuserattribute.final BlockActions.BuildersetView(ViewResponseBase view) Initializes the optional valueviewto view.final BlockActions.BuildersetView(Optional<? extends ViewResponseBase> view) Initializes the optional valueviewto view.
-
Method Details
-
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
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.interaction.BlockActionsIFinstance.- 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
-
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
-
setTriggerId
Initializes the value for thetriggerIdattribute.- Parameters:
triggerId- The value for triggerId- Returns:
thisbuilder for use in a chained invocation
-
setResponseUrl
Initializes the optional valueresponseUrlto responseUrl.- Parameters:
responseUrl- The value for responseUrl,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setResponseUrl
Initializes the optional valueresponseUrlto responseUrl.- Parameters:
responseUrl- The value for responseUrl- Returns:
thisbuilder for use in a chained invocation
-
setMessage
Initializes the optional valuemessageto message.- Parameters:
message- The value for message,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setMessage
Initializes the optional valuemessageto message.- Parameters:
message- The value for message- Returns:
thisbuilder for use in a chained invocation
-
setView
Initializes the optional valueviewto view.- Parameters:
view- The value for view,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setView
Initializes the optional valueviewto view.- Parameters:
view- The value for view- Returns:
thisbuilder for use in a chained invocation
-
addElementActions
Adds one element toelementActionslist.- Parameters:
element- A elementActions element- Returns:
thisbuilder for use in a chained invocation
-
addElementActions
Adds elements toelementActionslist.- Parameters:
elements- An array of elementActions elements- Returns:
thisbuilder for use in a chained invocation
-
setElementActions
public final BlockActions.Builder setElementActions(Iterable<? extends BlockElementAction> elements) Sets or replaces all elements forelementActionslist.- Parameters:
elements- An iterable of elementActions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllElementActions
public final BlockActions.Builder addAllElementActions(Iterable<? extends BlockElementAction> elements) Adds elements toelementActionslist.- Parameters:
elements- An iterable of elementActions elements- Returns:
thisbuilder for use in a chained invocation
-
setState
Initializes the optional valuestateto state.- Parameters:
state- The value for state,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setState
Initializes the optional valuestateto state.- Parameters:
state- The value for state- Returns:
thisbuilder for use in a chained invocation
-
setContainer
Initializes the optional valuecontainerto container.- Parameters:
container- The value for container,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setContainer
Initializes the optional valuecontainerto container.- Parameters:
container- The value for container- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newBlockActions.- Returns:
- An immutable instance of BlockActions
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-