Class MarkdownBlock.Builder
java.lang.Object
com.hubspot.slack.client.models.blocks.MarkdownBlock.Builder
- Enclosing class:
MarkdownBlock
@Generated(from="MarkdownBlockIF",
generator="Immutables")
@NotThreadSafe
public static final class MarkdownBlock.Builder
extends Object
Builds instances of type
MarkdownBlock.
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 TypeMethodDescriptionbuild()Builds a newMarkdownBlock.final MarkdownBlock.BuilderFill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.Blockinstance.final MarkdownBlock.Builderfrom(MarkdownBlockIF instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.MarkdownBlockIFinstance.final MarkdownBlock.BuildersetBlockId(String blockId) Initializes the optional valueblockIdto blockId.final MarkdownBlock.BuildersetBlockId(Optional<String> blockId) Initializes the optional valueblockIdto blockId.final MarkdownBlock.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.MarkdownBlockIFinstance.- 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.- Parameters:
text- The value for text- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newMarkdownBlock.- Returns:
- An immutable instance of MarkdownBlock
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-