Class RichTextBlock.Builder
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBlock.Builder
- Enclosing class:
RichTextBlock
@Generated(from="RichTextBlockIF",
generator="Immutables")
@NotThreadSafe
public static final class RichTextBlock.Builder
extends Object
Builds instances of type
RichTextBlock.
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 RichTextBlock.BuilderaddAllElements(Iterable<? extends RichTextObject> elements) Adds elements toelementslist.final RichTextBlock.BuilderaddElements(RichTextObject element) Adds one element toelementslist.final RichTextBlock.BuilderaddElements(RichTextObject... elements) Adds elements toelementslist.build()Builds a newRichTextBlock.final RichTextBlock.BuilderFill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.Blockinstance.final RichTextBlock.Builderfrom(RichTextBlockIF instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBlockIFinstance.final RichTextBlock.BuildersetBlockId(String blockId) Initializes the optional valueblockIdto blockId.final RichTextBlock.BuildersetBlockId(Optional<String> blockId) Initializes the optional valueblockIdto blockId.final RichTextBlock.BuildersetElements(Iterable<? extends RichTextObject> elements) Sets or replaces all elements forelementslist.
-
Method Details
-
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
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBlockIFinstance.- 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
Sets or replaces all elements forelementslist.- Parameters:
elements- An iterable of elements elements- Returns:
thisbuilder for use in a chained invocation
-
addAllElements
Adds elements toelementslist.- Parameters:
elements- An iterable of elements elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newRichTextBlock.- Returns:
- An immutable instance of RichTextBlock
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-