java.lang.Object
com.hubspot.slack.client.models.blocks.Table
All Implemented Interfaces:
BlockOrAttachment, Block, ContainerChildBlock, TableIF, ChatUnfurlBlocksOrAttachment

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

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

  • Method Details

    • getBlockId

      public Optional<String> getBlockId()
      Specified by:
      getBlockId in interface Block
      Returns:
      The value of the blockId attribute
    • getType

      public String getType()
      Specified by:
      getType in interface Block
      Specified by:
      getType in interface TableIF
      Returns:
      The computed-at-construction value of the type attribute
    • getRows

      public com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<TableCell>> getRows()
      Specified by:
      getRows in interface TableIF
      Returns:
      The value of the rows attribute
    • getColumnSettings

      public com.google.common.collect.ImmutableList<TableColumnSetting> getColumnSettings()
      Specified by:
      getColumnSettings in interface TableIF
      Returns:
      The value of the columnSettings attribute
    • withBlockId

      public final Table withBlockId(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional blockId attribute.
      Parameters:
      value - The value for blockId, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withBlockId

      public final Table withBlockId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the blockId attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for blockId
      Returns:
      A modified copy or this if not changed
    • withRows

      @SafeVarargs public final Table withRows(com.google.common.collect.ImmutableList<TableCell>... elements)
      Copy the current immutable object with elements that replace the content of rows.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withRows

      public final Table withRows(Iterable<? extends com.google.common.collect.ImmutableList<TableCell>> elements)
      Copy the current immutable object with elements that replace the content of rows. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of rows elements to set
      Returns:
      A modified copy or this if not changed
    • withColumnSettings

      public final Table withColumnSettings(TableColumnSetting... elements)
      Copy the current immutable object with elements that replace the content of columnSettings.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withColumnSettings

      public final Table withColumnSettings(Iterable<? extends TableColumnSetting> elements)
      Copy the current immutable object with elements that replace the content of columnSettings. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of columnSettings 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 Table 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: blockId, type, rows, columnSettings.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static Table of(com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<TableCell>> rows)
      Construct a new immutable Table instance.
      Parameters:
      rows - The value for the rows attribute
      Returns:
      An immutable Table instance
    • of

      public static Table of(Iterable<? extends com.google.common.collect.ImmutableList<TableCell>> rows)
      Construct a new immutable Table instance.
      Parameters:
      rows - The value for the rows attribute
      Returns:
      An immutable Table instance
    • copyOf

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

      public static Table.Builder builder()
      Creates a builder for Table.
       Table.builder()
          .setBlockId(Optional<String>) // optional blockId
          .addRows|addAllRows(com.google.common.collect.ImmutableList<com.hubspot.slack.client.models.blocks.table.TableCell>) // rows elements
          .addColumnSettings|addAllColumnSettings(com.hubspot.slack.client.models.blocks.table.TableColumnSetting) // columnSettings elements
          .build();
       
      Returns:
      A new Table builder