Class ChatUnfurlBlocks

java.lang.Object
com.hubspot.slack.client.methods.params.chat.ChatUnfurlBlocks
All Implemented Interfaces:
ChatUnfurlBlocksIF, ChatUnfurlBlocksOrAttachment

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

Use the builder to create immutable instances: ChatUnfurlBlocks.builder(). Use the static factory method to create immutable instances: ChatUnfurlBlocks.of().

  • Method Details

    • getBlocks

      public List<? extends BlockOrAttachment> getBlocks()
      Specified by:
      getBlocks in interface ChatUnfurlBlocksIF
      Returns:
      The value of the blocks attribute
    • withBlocks

      public final ChatUnfurlBlocks withBlocks(List<? extends BlockOrAttachment> value)
      Copy the current immutable object by setting a value for the blocks attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for blocks
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ChatUnfurlBlocks 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: blocks.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ChatUnfurlBlocks of(List<? extends BlockOrAttachment> blocks)
      Construct a new immutable ChatUnfurlBlocks instance.
      Parameters:
      blocks - The value for the blocks attribute
      Returns:
      An immutable ChatUnfurlBlocks instance
    • copyOf

      public static ChatUnfurlBlocks copyOf(ChatUnfurlBlocksIF instance)
      Creates an immutable copy of a ChatUnfurlBlocksIF 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 ChatUnfurlBlocks instance
    • builder

      public static ChatUnfurlBlocks.Builder builder()
      Creates a builder for ChatUnfurlBlocks.
       ChatUnfurlBlocks.builder()
          .setBlocks(List<? extends com.hubspot.slack.client.models.BlockOrAttachment>) // required blocks
          .build();
       
      Returns:
      A new ChatUnfurlBlocks builder