Class WorkObjectActionBlock.Builder
java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.actions.WorkObjectActionBlock.Builder
- Enclosing class:
WorkObjectActionBlock
@Generated(from="WorkObjectActionBlockIF",
generator="Immutables")
@NotThreadSafe
public static final class WorkObjectActionBlock.Builder
extends Object
Builds instances of type
WorkObjectActionBlock.
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 TypeMethodDescriptionaddAllOverflowActions(Iterable<? extends WorkObjectAction> elements) Adds elements tooverflowActionslist.addAllPrimaryActions(Iterable<? extends WorkObjectAction> elements) Adds elements toprimaryActionslist.addOverflowActions(WorkObjectAction element) Adds one element tooverflowActionslist.addOverflowActions(WorkObjectAction... elements) Adds elements tooverflowActionslist.addPrimaryActions(WorkObjectAction element) Adds one element toprimaryActionslist.addPrimaryActions(WorkObjectAction... elements) Adds elements toprimaryActionslist.build()Builds a newWorkObjectActionBlock.from(WorkObjectActionBlockIF instance) Fill a builder with attribute values from the providedWorkObjectActionBlockIFinstance.setOverflowActions(Iterable<? extends WorkObjectAction> elements) Sets or replaces all elements foroverflowActionslist.setPrimaryActions(Iterable<? extends WorkObjectAction> elements) Sets or replaces all elements forprimaryActionslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedWorkObjectActionBlockIFinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addPrimaryActions
Adds one element toprimaryActionslist.- Parameters:
element- A primaryActions element- Returns:
thisbuilder for use in a chained invocation
-
addPrimaryActions
Adds elements toprimaryActionslist.- Parameters:
elements- An array of primaryActions elements- Returns:
thisbuilder for use in a chained invocation
-
setPrimaryActions
public final WorkObjectActionBlock.Builder setPrimaryActions(Iterable<? extends WorkObjectAction> elements) Sets or replaces all elements forprimaryActionslist.- Parameters:
elements- An iterable of primaryActions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllPrimaryActions
public final WorkObjectActionBlock.Builder addAllPrimaryActions(Iterable<? extends WorkObjectAction> elements) Adds elements toprimaryActionslist.- Parameters:
elements- An iterable of primaryActions elements- Returns:
thisbuilder for use in a chained invocation
-
addOverflowActions
Adds one element tooverflowActionslist.- Parameters:
element- A overflowActions element- Returns:
thisbuilder for use in a chained invocation
-
addOverflowActions
Adds elements tooverflowActionslist.- Parameters:
elements- An array of overflowActions elements- Returns:
thisbuilder for use in a chained invocation
-
setOverflowActions
public final WorkObjectActionBlock.Builder setOverflowActions(Iterable<? extends WorkObjectAction> elements) Sets or replaces all elements foroverflowActionslist.- Parameters:
elements- An iterable of overflowActions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllOverflowActions
public final WorkObjectActionBlock.Builder addAllOverflowActions(Iterable<? extends WorkObjectAction> elements) Adds elements tooverflowActionslist.- Parameters:
elements- An iterable of overflowActions elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWorkObjectActionBlock.- Returns:
- An immutable instance of WorkObjectActionBlock
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-