Class RichTextList.Builder
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextList.Builder
- Enclosing class:
RichTextList
@Generated(from="RichTextListIF",
generator="Immutables")
@NotThreadSafe
public static final class RichTextList.Builder
extends Object
Builds instances of type
RichTextList.
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 RichTextList.BuilderaddAllElements(Iterable<? extends RichTextSection> elements) Adds elements toelementslist.final RichTextList.BuilderaddElements(RichTextSection element) Adds one element toelementslist.final RichTextList.BuilderaddElements(RichTextSection... elements) Adds elements toelementslist.build()Builds a newRichTextList.final RichTextList.Builderfrom(RichTextListIF instance) Fill a builder with attribute values from the providedRichTextListIFinstance.final RichTextList.BuilderInitializes the optional valueborderto border.final RichTextList.BuilderInitializes the optional valueborderto border.final RichTextList.BuildersetElements(Iterable<? extends RichTextSection> elements) Sets or replaces all elements forelementslist.final RichTextList.BuilderInitializes the optional valueindentto indent.final RichTextList.BuilderInitializes the optional valueindentto indent.final RichTextList.BuilderInitializes the optional valueoffsetto offset.final RichTextList.BuilderInitializes the optional valueoffsetto offset.final RichTextList.BuildersetStyle(RichTextListStyle style) Initializes the value for thestyleattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedRichTextListIFinstance. 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
-
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
-
setStyle
Initializes the value for thestyleattribute.- Parameters:
style- The value for style- Returns:
thisbuilder for use in a chained invocation
-
setIndent
Initializes the optional valueindentto indent.- Parameters:
indent- The value for indent,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setIndent
Initializes the optional valueindentto indent.- Parameters:
indent- The value for indent- Returns:
thisbuilder for use in a chained invocation
-
setBorder
Initializes the optional valueborderto border.- Parameters:
border- The value for border,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setBorder
Initializes the optional valueborderto border.- Parameters:
border- The value for border- Returns:
thisbuilder for use in a chained invocation
-
setOffset
Initializes the optional valueoffsetto offset.- Parameters:
offset- The value for offset,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setOffset
Initializes the optional valueoffsetto offset.- Parameters:
offset- The value for offset- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newRichTextList.- Returns:
- An immutable instance of RichTextList
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-