Class Table.Builder

java.lang.Object
com.hubspot.slack.client.models.blocks.Table.Builder
Enclosing class:
Table

@Generated(from="TableIF", generator="Immutables") @NotThreadSafe public static final class Table.Builder extends Object
Builds instances of type Table. 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 Table.Builder from(Block instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.blocks.Block instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final Table.Builder from(TableIF instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.blocks.TableIF instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setBlockId

      public final Table.Builder setBlockId(@Nullable String blockId)
      Initializes the optional value blockId to blockId.
      Parameters:
      blockId - The value for blockId, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setBlockId

      public final Table.Builder setBlockId(Optional<String> blockId)
      Initializes the optional value blockId to blockId.
      Parameters:
      blockId - The value for blockId
      Returns:
      this builder for use in a chained invocation
    • addRows

      public final Table.Builder addRows(com.google.common.collect.ImmutableList<TableCell> element)
      Adds one element to rows list.
      Parameters:
      element - A rows element
      Returns:
      this builder for use in a chained invocation
    • addRows

      @SafeVarargs public final Table.Builder addRows(com.google.common.collect.ImmutableList<TableCell>... elements)
      Adds elements to rows list.
      Parameters:
      elements - An array of rows elements
      Returns:
      this builder for use in a chained invocation
    • setRows

      public final Table.Builder setRows(Iterable<? extends com.google.common.collect.ImmutableList<TableCell>> elements)
      Sets or replaces all elements for rows list.
      Parameters:
      elements - An iterable of rows elements
      Returns:
      this builder for use in a chained invocation
    • addAllRows

      public final Table.Builder addAllRows(Iterable<? extends com.google.common.collect.ImmutableList<TableCell>> elements)
      Adds elements to rows list.
      Parameters:
      elements - An iterable of rows elements
      Returns:
      this builder for use in a chained invocation
    • addColumnSettings

      public final Table.Builder addColumnSettings(TableColumnSetting element)
      Adds one element to columnSettings list.
      Parameters:
      element - A columnSettings element
      Returns:
      this builder for use in a chained invocation
    • addColumnSettings

      public final Table.Builder addColumnSettings(TableColumnSetting... elements)
      Adds elements to columnSettings list.
      Parameters:
      elements - An array of columnSettings elements
      Returns:
      this builder for use in a chained invocation
    • setColumnSettings

      public final Table.Builder setColumnSettings(Iterable<? extends TableColumnSetting> elements)
      Sets or replaces all elements for columnSettings list.
      Parameters:
      elements - An iterable of columnSettings elements
      Returns:
      this builder for use in a chained invocation
    • addAllColumnSettings

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

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