Class OverflowMenu
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.OverflowMenu
- All Implemented Interfaces:
BlockElement,HasActionId,OverflowMenuIF
@Generated(from="OverflowMenuIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class OverflowMenu
extends Object
implements OverflowMenuIF
Immutable implementation of
OverflowMenuIF.
Use the builder to create immutable instances:
OverflowMenu.builder().
Use the static factory method to create immutable instances:
OverflowMenu.of().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.OverflowMenuIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic OverflowMenu.Builderbuilder()Creates a builder forOverflowMenu.static OverflowMenucopyOf(OverflowMenuIF instance) Creates an immutable copy of aOverflowMenuIFvalue.booleanThis instance is equal to all instances ofOverflowMenuthat have equal attribute values.getType()inthashCode()Computes a hash code from attributes:type,actionId,options,confirmationDialog.static OverflowMenuConstruct a new immutableOverflowMenuinstance.static OverflowMenuConstruct a new immutableOverflowMenuinstance.toString()Prints the immutable valueOverflowMenuwith attribute values.final OverflowMenuwithActionId(String value) Copy the current immutable object by setting a value for theactionIdattribute.final OverflowMenuCopy the current immutable object by setting a present value for the optionalconfirmationDialogattribute.final OverflowMenuwithConfirmationDialog(Optional<? extends ConfirmationDialog> optional) Copy the current immutable object by setting an optional value for theconfirmationDialogattribute.final OverflowMenuwithOptions(Option... elements) Copy the current immutable object with elements that replace the content ofoptions.final OverflowMenuwithOptions(Iterable<? extends Option> elements) Copy the current immutable object with elements that replace the content ofoptions.
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceOverflowMenuIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getActionId
- Specified by:
getActionIdin interfaceHasActionId- Specified by:
getActionIdin interfaceOverflowMenuIF- Returns:
- The value of the
actionIdattribute
-
getOptions
- Specified by:
getOptionsin interfaceOverflowMenuIF- Returns:
- The value of the
optionsattribute
-
getConfirmationDialog
- Specified by:
getConfirmationDialogin interfaceOverflowMenuIF- Returns:
- The value of the
confirmationDialogattribute
-
withActionId
Copy the current immutable object by setting a value for theactionIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for actionId- Returns:
- A modified copy or the
thisobject
-
withOptions
Copy the current immutable object with elements that replace the content ofoptions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withOptions
Copy the current immutable object with elements that replace the content ofoptions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of options elements to set- Returns:
- A modified copy or
thisif not changed
-
withConfirmationDialog
Copy the current immutable object by setting a present value for the optionalconfirmationDialogattribute.- Parameters:
value- The value for confirmationDialog,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withConfirmationDialog
Copy the current immutable object by setting an optional value for theconfirmationDialogattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for confirmationDialog- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofOverflowMenuthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,actionId,options,confirmationDialog. -
toString
Prints the immutable valueOverflowMenuwith attribute values. -
of
Construct a new immutableOverflowMenuinstance.- Parameters:
actionId- The value for theactionIdattributeoptions- The value for theoptionsattribute- Returns:
- An immutable OverflowMenu instance
-
of
Construct a new immutableOverflowMenuinstance.- Parameters:
actionId- The value for theactionIdattributeoptions- The value for theoptionsattribute- Returns:
- An immutable OverflowMenu instance
-
copyOf
Creates an immutable copy of aOverflowMenuIFvalue. 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 OverflowMenu instance
-
builder
Creates a builder forOverflowMenu.OverflowMenu.builder() .setActionId(String) // requiredactionId.addOptions|addAllOptions(com.hubspot.slack.client.models.blocks.objects.Option) //optionselements .setConfirmationDialog(Optional<com.hubspot.slack.client.models.blocks.objects.ConfirmationDialog>) // optionalconfirmationDialog.build();- Returns:
- A new OverflowMenu builder
-