Class BlocksChunk.Builder
java.lang.Object
com.hubspot.slack.client.methods.params.stream.chunks.BlocksChunk.Builder
- Enclosing class:
BlocksChunk
@Generated(from="BlocksChunkIF",
generator="Immutables")
@NotThreadSafe
public static final class BlocksChunk.Builder
extends Object
Builds instances of type
BlocksChunk.
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 BlocksChunk.BuilderaddAllBlocks(Iterable<? extends Block> elements) Adds elements toblockslist.final BlocksChunk.BuilderAdds one element toblockslist.final BlocksChunk.BuilderAdds elements toblockslist.build()Builds a newBlocksChunk.final BlocksChunk.Builderfrom(BlocksChunkIF instance) Fill a builder with attribute values from the providedBlocksChunkIFinstance.final BlocksChunk.BuilderSets or replaces all elements forblockslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedBlocksChunkIFinstance. 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
-
addBlocks
Adds one element toblockslist.- Parameters:
element- A blocks element- Returns:
thisbuilder for use in a chained invocation
-
addBlocks
Adds elements toblockslist.- Parameters:
elements- An array of blocks elements- Returns:
thisbuilder for use in a chained invocation
-
setBlocks
Sets or replaces all elements forblockslist.- Parameters:
elements- An iterable of blocks elements- Returns:
thisbuilder for use in a chained invocation
-
addAllBlocks
Adds elements toblockslist.- Parameters:
elements- An iterable of blocks elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newBlocksChunk.- Returns:
- An immutable instance of BlocksChunk
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-