Class Divider
java.lang.Object
com.hubspot.slack.client.models.blocks.Divider
- All Implemented Interfaces:
BlockOrAttachment,Block,ContainerChildBlock,DividerIF,ChatUnfurlBlocksOrAttachment
@Generated(from="DividerIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class Divider
extends Object
implements DividerIF
Immutable implementation of
DividerIF.
Use the builder to create immutable instances:
Divider.builder().
-
Nested Class Summary
Nested Classes -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Divider.Builderbuilder()Creates a builder forDivider.static DividerCreates an immutable copy of aDividerIFvalue.booleanThis instance is equal to all instances ofDividerthat have equal attribute values.getType()inthashCode()Computes a hash code from attributes:blockId,type.toString()Prints the immutable valueDividerwith attribute values.final DividerwithBlockId(String value) Copy the current immutable object by setting a present value for the optionalblockIdattribute.final DividerwithBlockId(Optional<String> optional) Copy the current immutable object by setting an optional value for theblockIdattribute.
-
Method Details
-
getBlockId
- Specified by:
getBlockIdin interfaceBlock- Returns:
- The value of the
blockIdattribute
-
getType
-
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
-
equals
This instance is equal to all instances ofDividerthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:blockId,type. -
toString
Prints the immutable valueDividerwith attribute values. -
copyOf
Creates an immutable copy of aDividerIFvalue. 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 Divider instance
-
builder
Creates a builder forDivider.Divider.builder() .setBlockId(Optional<String>) // optionalblockId.build();- Returns:
- A new Divider builder
-