java.lang.Object
com.hubspot.slack.client.methods.params.stream.chunks.BlocksChunk
All Implemented Interfaces:
BlocksChunkIF, StreamChunk

@Generated(from="BlocksChunkIF", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class BlocksChunk extends Object implements BlocksChunkIF
Immutable implementation of BlocksChunkIF.

Use the builder to create immutable instances: BlocksChunk.builder().

  • Method Details

    • getType

      public String getType()
      Specified by:
      getType in interface BlocksChunkIF
      Specified by:
      getType in interface StreamChunk
      Returns:
      The computed-at-construction value of the type attribute
    • getBlocks

      public com.google.common.collect.ImmutableList<Block> getBlocks()
      Specified by:
      getBlocks in interface BlocksChunkIF
      Returns:
      The value of the blocks attribute
    • withBlocks

      public final BlocksChunk withBlocks(Block... elements)
      Copy the current immutable object with elements that replace the content of blocks.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withBlocks

      public final BlocksChunk withBlocks(Iterable<? extends Block> elements)
      Copy the current immutable object with elements that replace the content of blocks. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of blocks elements to set
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of BlocksChunk that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: type, blocks.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value BlocksChunk with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static BlocksChunk copyOf(BlocksChunkIF instance)
      Creates an immutable copy of a BlocksChunkIF value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable BlocksChunk instance
    • builder

      public static BlocksChunk.Builder builder()
      Creates a builder for BlocksChunk.
       BlocksChunk.builder()
          .addBlocks|addAllBlocks(com.hubspot.slack.client.models.blocks.Block) // blocks elements
          .build();
       
      Returns:
      A new BlocksChunk builder