Class ContextActionsBlock
java.lang.Object
com.hubspot.slack.client.models.blocks.ContextActionsBlock
- All Implemented Interfaces:
BlockOrAttachment,Block,ContextActionsBlockIF,ChatUnfurlBlocksOrAttachment
@Generated(from="ContextActionsBlockIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ContextActionsBlock
extends Object
implements ContextActionsBlockIF
Immutable implementation of
ContextActionsBlockIF.
Use the builder to create immutable instances:
ContextActionsBlock.builder().
Use the static factory method to create immutable instances:
ContextActionsBlock.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeContextActionsBlock. -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.ContextActionsBlockIF
MAX_BLOCK_ID_LENGTH, MAX_ELEMENTS, TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic ContextActionsBlock.Builderbuilder()Creates a builder forContextActionsBlock.static ContextActionsBlockcopyOf(ContextActionsBlockIF instance) Creates an immutable copy of aContextActionsBlockIFvalue.booleanThis instance is equal to all instances ofContextActionsBlockthat have equal attribute values.com.google.common.collect.ImmutableList<ContextActionsElement> getType()inthashCode()Computes a hash code from attributes:blockId,type,elements.static ContextActionsBlockof(com.google.common.collect.ImmutableList<ContextActionsElement> elements) Construct a new immutableContextActionsBlockinstance.static ContextActionsBlockof(Iterable<? extends ContextActionsElement> elements) Construct a new immutableContextActionsBlockinstance.toString()Prints the immutable valueContextActionsBlockwith attribute values.final ContextActionsBlockwithBlockId(String value) Copy the current immutable object by setting a present value for the optionalblockIdattribute.final ContextActionsBlockwithBlockId(Optional<String> optional) Copy the current immutable object by setting an optional value for theblockIdattribute.final ContextActionsBlockwithElements(ContextActionsElement... elements) Copy the current immutable object with elements that replace the content ofelements.final ContextActionsBlockwithElements(Iterable<? extends ContextActionsElement> elements) Copy the current immutable object with elements that replace the content ofelements.Methods inherited from interface com.hubspot.slack.client.models.blocks.ContextActionsBlockIF
check
-
Method Details
-
getBlockId
- Specified by:
getBlockIdin interfaceBlock- Returns:
- The value of the
blockIdattribute
-
getType
- Specified by:
getTypein interfaceBlock- Specified by:
getTypein interfaceContextActionsBlockIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getElements
- Specified by:
getElementsin interfaceContextActionsBlockIF- 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 ofContextActionsBlockthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:blockId,type,elements. -
toString
Prints the immutable valueContextActionsBlockwith attribute values. -
of
public static ContextActionsBlock of(com.google.common.collect.ImmutableList<ContextActionsElement> elements) Construct a new immutableContextActionsBlockinstance.- Parameters:
elements- The value for theelementsattribute- Returns:
- An immutable ContextActionsBlock instance
-
of
Construct a new immutableContextActionsBlockinstance.- Parameters:
elements- The value for theelementsattribute- Returns:
- An immutable ContextActionsBlock instance
-
copyOf
Creates an immutable copy of aContextActionsBlockIFvalue. 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 ContextActionsBlock instance
-
builder
Creates a builder forContextActionsBlock.ContextActionsBlock.builder() .setBlockId(Optional<String>) // optionalblockId.addElements|addAllElements(com.hubspot.slack.client.models.blocks.elements.contextactionselements.ContextActionsElement) //elementselements .build();- Returns:
- A new ContextActionsBlock builder
-