Class ContextActionsBlock.Builder
java.lang.Object
com.hubspot.slack.client.models.blocks.ContextActionsBlock.Builder
- Enclosing class:
ContextActionsBlock
@Generated(from="ContextActionsBlockIF",
generator="Immutables")
@NotThreadSafe
public static final class ContextActionsBlock.Builder
extends Object
Builds instances of type
ContextActionsBlock.
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 TypeMethodDescriptionaddAllElements(Iterable<? extends ContextActionsElement> elements) Adds elements toelementslist.addElements(ContextActionsElement element) Adds one element toelementslist.addElements(ContextActionsElement... elements) Adds elements toelementslist.build()Builds a newContextActionsBlock.Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.Blockinstance.from(ContextActionsBlockIF instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.ContextActionsBlockIFinstance.setBlockId(String blockId) Initializes the optional valueblockIdto blockId.setBlockId(Optional<String> blockId) Initializes the optional valueblockIdto blockId.setElements(Iterable<? extends ContextActionsElement> elements) Sets or replaces all elements forelementslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.ContextActionsBlockIFinstance.- 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.blocks.Blockinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setBlockId
Initializes the optional valueblockIdto blockId.- Parameters:
blockId- The value for blockId,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setBlockId
Initializes the optional valueblockIdto blockId.- Parameters:
blockId- The value for blockId- Returns:
thisbuilder for use in a chained invocation
-
addElements
Adds one element toelementslist.- Parameters:
element- A elements element- Returns:
thisbuilder for use in a chained invocation
-
addElements
Adds elements toelementslist.- Parameters:
elements- An array of elements elements- Returns:
thisbuilder for use in a chained invocation
-
setElements
public final ContextActionsBlock.Builder setElements(Iterable<? extends ContextActionsElement> elements) Sets or replaces all elements forelementslist.- Parameters:
elements- An iterable of elements elements- Returns:
thisbuilder for use in a chained invocation
-
addAllElements
public final ContextActionsBlock.Builder addAllElements(Iterable<? extends ContextActionsElement> elements) Adds elements toelementslist.- Parameters:
elements- An iterable of elements elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newContextActionsBlock.- Returns:
- An immutable instance of ContextActionsBlock
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-