Class DataTable
java.lang.Object
com.hubspot.slack.client.models.blocks.DataTable
- All Implemented Interfaces:
BlockOrAttachment,Block,DataTableIF,ChatUnfurlBlocksOrAttachment
@Generated(from="DataTableIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class DataTable
extends Object
implements DataTableIF
Immutable implementation of
DataTableIF.
Use the builder to create immutable instances:
DataTable.builder().
Use the static factory method to create immutable instances:
DataTable.of().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.DataTableIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic DataTable.Builderbuilder()Creates a builder forDataTable.static DataTablecopyOf(DataTableIF instance) Creates an immutable copy of aDataTableIFvalue.booleanThis instance is equal to all instances ofDataTablethat have equal attribute values.com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<DataTableCell>> getRows()getType()inthashCode()Computes a hash code from attributes:blockId,type,caption,rows,pageSize,rowHeaderColumnIndex.static DataTableof(String caption, Iterable<? extends com.google.common.collect.ImmutableList<DataTableCell>> rows) Construct a new immutableDataTableinstance.static DataTableof(Optional<String> caption, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<DataTableCell>> rows) Construct a new immutableDataTableinstance.static DataTableof(Optional<String> caption, Iterable<? extends com.google.common.collect.ImmutableList<DataTableCell>> rows) Construct a new immutableDataTableinstance.toString()Prints the immutable valueDataTablewith attribute values.final DataTablewithBlockId(String value) Copy the current immutable object by setting a present value for the optionalblockIdattribute.final DataTablewithBlockId(Optional<String> optional) Copy the current immutable object by setting an optional value for theblockIdattribute.final DataTablewithCaption(String value) Copy the current immutable object by setting a present value for the optionalcaptionattribute.final DataTablewithCaption(Optional<String> optional) Copy the current immutable object by setting an optional value for thecaptionattribute.final DataTablewithPageSize(Integer value) Copy the current immutable object by setting a present value for the optionalpageSizeattribute.final DataTablewithPageSize(Optional<Integer> optional) Copy the current immutable object by setting an optional value for thepageSizeattribute.final DataTablewithRowHeaderColumnIndex(Integer value) Copy the current immutable object by setting a present value for the optionalrowHeaderColumnIndexattribute.final DataTablewithRowHeaderColumnIndex(Optional<Integer> optional) Copy the current immutable object by setting an optional value for therowHeaderColumnIndexattribute.final DataTablewithRows(com.google.common.collect.ImmutableList<DataTableCell>... elements) Copy the current immutable object with elements that replace the content ofrows.final DataTablewithRows(Iterable<? extends com.google.common.collect.ImmutableList<DataTableCell>> elements) Copy the current immutable object with elements that replace the content ofrows.Methods inherited from interface com.hubspot.slack.client.models.blocks.DataTableIF
check
-
Method Details
-
getBlockId
- Specified by:
getBlockIdin interfaceBlock- Returns:
- The value of the
blockIdattribute
-
getType
- Specified by:
getTypein interfaceBlock- Specified by:
getTypein interfaceDataTableIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getCaption
- Specified by:
getCaptionin interfaceDataTableIF- Returns:
- The value of the
captionattribute
-
getRows
public com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<DataTableCell>> getRows()- Specified by:
getRowsin interfaceDataTableIF- Returns:
- The value of the
rowsattribute
-
getPageSize
- Specified by:
getPageSizein interfaceDataTableIF- Returns:
- The value of the
pageSizeattribute
-
getRowHeaderColumnIndex
- Specified by:
getRowHeaderColumnIndexin interfaceDataTableIF- Returns:
- The value of the
rowHeaderColumnIndexattribute
-
withBlockId
Copy the current immutable object by setting a present value for the optionalblockIdattribute.- Parameters:
value- The value for blockId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withBlockId
Copy the current immutable object by setting an optional value for theblockIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for blockId- Returns:
- A modified copy or
thisif not changed
-
withCaption
Copy the current immutable object by setting a present value for the optionalcaptionattribute.- Parameters:
value- The value for caption,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withCaption
Copy the current immutable object by setting an optional value for thecaptionattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for caption- Returns:
- A modified copy or
thisif not changed
-
withRows
@SafeVarargs public final DataTable withRows(com.google.common.collect.ImmutableList<DataTableCell>... elements) Copy the current immutable object with elements that replace the content ofrows.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRows
public final DataTable withRows(Iterable<? extends com.google.common.collect.ImmutableList<DataTableCell>> elements) Copy the current immutable object with elements that replace the content ofrows. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of rows elements to set- Returns:
- A modified copy or
thisif not changed
-
withPageSize
Copy the current immutable object by setting a present value for the optionalpageSizeattribute.- Parameters:
value- The value for pageSize,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withPageSize
Copy the current immutable object by setting an optional value for thepageSizeattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for pageSize- Returns:
- A modified copy or
thisif not changed
-
withRowHeaderColumnIndex
Copy the current immutable object by setting a present value for the optionalrowHeaderColumnIndexattribute.- Parameters:
value- The value for rowHeaderColumnIndex,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withRowHeaderColumnIndex
Copy the current immutable object by setting an optional value for therowHeaderColumnIndexattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for rowHeaderColumnIndex- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofDataTablethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:blockId,type,caption,rows,pageSize,rowHeaderColumnIndex. -
toString
Prints the immutable valueDataTablewith attribute values. -
of
public static DataTable of(Optional<String> caption, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<DataTableCell>> rows) Construct a new immutableDataTableinstance.- Parameters:
caption- The value for thecaptionattributerows- The value for therowsattribute- Returns:
- An immutable DataTable instance
-
of
public static DataTable of(Optional<String> caption, Iterable<? extends com.google.common.collect.ImmutableList<DataTableCell>> rows) Construct a new immutableDataTableinstance.- Parameters:
caption- The value for thecaptionattributerows- The value for therowsattribute- Returns:
- An immutable DataTable instance
-
of
public static DataTable of(@Nullable String caption, Iterable<? extends com.google.common.collect.ImmutableList<DataTableCell>> rows) Construct a new immutableDataTableinstance.- Parameters:
caption- The value for thecaptionattributerows- The value for therowsattribute- Returns:
- An immutable DataTable instance
-
copyOf
Creates an immutable copy of aDataTableIFvalue. 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 DataTable instance
-
builder
Creates a builder forDataTable.DataTable.builder() .setBlockId(Optional<String>) // optionalblockId.setCaption(Optional<String>) // optionalcaption.addRows|addAllRows(com.google.common.collect.ImmutableList<com.hubspot.slack.client.models.blocks.table.DataTableCell>) //rowselements .setPageSize(Optional<Integer>) // optionalpageSize.setRowHeaderColumnIndex(Optional<Integer>) // optionalrowHeaderColumnIndex.build();- Returns:
- A new DataTable builder
-