Class DataTable.Builder

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

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

      public final DataTable.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 DataTable.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
    • setCaption

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

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

      public final DataTable.Builder addRows(com.google.common.collect.ImmutableList<DataTableCell> 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 DataTable.Builder addRows(com.google.common.collect.ImmutableList<DataTableCell>... 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 DataTable.Builder setRows(Iterable<? extends com.google.common.collect.ImmutableList<DataTableCell>> 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 DataTable.Builder addAllRows(Iterable<? extends com.google.common.collect.ImmutableList<DataTableCell>> elements)
      Adds elements to rows list.
      Parameters:
      elements - An iterable of rows elements
      Returns:
      this builder for use in a chained invocation
    • setPageSize

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

      public final DataTable.Builder setPageSize(Optional<Integer> pageSize)
      Initializes the optional value pageSize to pageSize.
      Parameters:
      pageSize - The value for pageSize
      Returns:
      this builder for use in a chained invocation
    • setRowHeaderColumnIndex

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

      public final DataTable.Builder setRowHeaderColumnIndex(Optional<Integer> rowHeaderColumnIndex)
      Initializes the optional value rowHeaderColumnIndex to rowHeaderColumnIndex.
      Parameters:
      rowHeaderColumnIndex - The value for rowHeaderColumnIndex
      Returns:
      this builder for use in a chained invocation
    • build

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