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 Details

    • from

      public final BlocksChunk.Builder from(BlocksChunkIF instance)
      Fill a builder with attribute values from the provided BlocksChunkIF instance. 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:
      this builder for use in a chained invocation
    • addBlocks

      public final BlocksChunk.Builder addBlocks(Block element)
      Adds one element to blocks list.
      Parameters:
      element - A blocks element
      Returns:
      this builder for use in a chained invocation
    • addBlocks

      public final BlocksChunk.Builder addBlocks(Block... elements)
      Adds elements to blocks list.
      Parameters:
      elements - An array of blocks elements
      Returns:
      this builder for use in a chained invocation
    • setBlocks

      public final BlocksChunk.Builder setBlocks(Iterable<? extends Block> elements)
      Sets or replaces all elements for blocks list.
      Parameters:
      elements - An iterable of blocks elements
      Returns:
      this builder for use in a chained invocation
    • addAllBlocks

      public final BlocksChunk.Builder addAllBlocks(Iterable<? extends Block> elements)
      Adds elements to blocks list.
      Parameters:
      elements - An iterable of blocks elements
      Returns:
      this builder for use in a chained invocation
    • build

      public BlocksChunk build()
      Builds a new BlocksChunk.
      Returns:
      An immutable instance of BlocksChunk
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing