Class Section.Builder
java.lang.Object
com.hubspot.slack.client.models.blocks.Section.Builder
- Enclosing class:
Section
@Generated(from="SectionIF",
generator="Immutables")
@NotThreadSafe
public static final class Section.Builder
extends Object
-
Method Summary
Modifier and TypeMethodDescriptionfinal Section.BuilderaddAllFields(Iterable<? extends Text> elements) Adds elements tofieldslist.final Section.BuilderAdds one element tofieldslist.final Section.BuilderAdds elements tofieldslist.build()Builds a newSection.final Section.BuilderFill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.Blockinstance.final Section.BuilderFill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.SectionIFinstance.final Section.BuildersetAccessory(BlockElement accessory) Initializes the optional valueaccessoryto accessory.final Section.BuildersetAccessory(Optional<? extends BlockElement> accessory) Initializes the optional valueaccessoryto accessory.final Section.BuildersetBlockId(String blockId) Initializes the optional valueblockIdto blockId.final Section.BuildersetBlockId(Optional<String> blockId) Initializes the optional valueblockIdto blockId.final Section.BuilderSets or replaces all elements forfieldslist.final Section.BuilderInitializes the value for thetextattribute.
-
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.SectionIFinstance.- 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
-
setText
Initializes the value for thetextattribute.If not set, this attribute will have a default value as returned by the initializer of
text.- Parameters:
text- The value for text (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addFields
Adds one element tofieldslist.- Parameters:
element- A fields element- Returns:
thisbuilder for use in a chained invocation
-
addFields
Adds elements tofieldslist.- Parameters:
elements- An array of fields elements- Returns:
thisbuilder for use in a chained invocation
-
setFields
Sets or replaces all elements forfieldslist.- Parameters:
elements- An iterable of fields elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFields
Adds elements tofieldslist.- Parameters:
elements- An iterable of fields elements- Returns:
thisbuilder for use in a chained invocation
-
setAccessory
Initializes the optional valueaccessoryto accessory.- Parameters:
accessory- The value for accessory,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setAccessory
Initializes the optional valueaccessoryto accessory.- Parameters:
accessory- The value for accessory- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSection.- Returns:
- An immutable instance of Section
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-