Class Actions
java.lang.Object
com.hubspot.slack.client.models.blocks.Actions
- All Implemented Interfaces:
BlockOrAttachment,ActionsIF,Block,ContainerChildBlock,ChatUnfurlBlocksOrAttachment
@Generated(from="ActionsIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class Actions
extends Object
implements ActionsIF
Immutable implementation of
ActionsIF.
Use the builder to create immutable instances:
Actions.builder().
Use the static factory method to create immutable instances:
Actions.of().
-
Nested Class Summary
Nested Classes -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Actions.Builderbuilder()Creates a builder forActions.static ActionsCreates an immutable copy of aActionsIFvalue.booleanThis instance is equal to all instances ofActionsthat have equal attribute values.getType()inthashCode()Computes a hash code from attributes:blockId,type,elements.static Actionsof(Iterable<? extends BlockElement> elements) Construct a new immutableActionsinstance.static Actionsof(List<BlockElement> elements) Construct a new immutableActionsinstance.toString()Prints the immutable valueActionswith attribute values.final ActionswithBlockId(String value) Copy the current immutable object by setting a present value for the optionalblockIdattribute.final ActionswithBlockId(Optional<String> optional) Copy the current immutable object by setting an optional value for theblockIdattribute.final ActionswithElements(BlockElement... elements) Copy the current immutable object with elements that replace the content ofelements.final ActionswithElements(Iterable<? extends BlockElement> elements) Copy the current immutable object with elements that replace the content ofelements.
-
Method Details
-
getBlockId
- Specified by:
getBlockIdin interfaceBlock- Returns:
- The value of the
blockIdattribute
-
getType
-
getElements
- Specified by:
getElementsin interfaceActionsIF- Returns:
- The value of the
elementsattribute
-
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
-
withElements
Copy the current immutable object with elements that replace the content ofelements.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withElements
Copy the current immutable object with elements that replace the content ofelements. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of elements elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofActionsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:blockId,type,elements. -
toString
Prints the immutable valueActionswith attribute values. -
of
Construct a new immutableActionsinstance.- Parameters:
elements- The value for theelementsattribute- Returns:
- An immutable Actions instance
-
of
Construct a new immutableActionsinstance.- Parameters:
elements- The value for theelementsattribute- Returns:
- An immutable Actions instance
-
copyOf
Creates an immutable copy of aActionsIFvalue. 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 Actions instance
-
builder
Creates a builder forActions.Actions.builder() .setBlockId(Optional<String>) // optionalblockId.addElements|addAllElements(com.hubspot.slack.client.models.blocks.elements.BlockElement) //elementselements .build();- Returns:
- A new Actions builder
-