@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","StaticSelectMenuIF"}) @Immutable public final class StaticSelectMenu extends Object implements StaticSelectMenuIF
StaticSelectMenuIF.
Use the builder to create immutable instances:
StaticSelectMenu.builder().
Use the static factory method to create immutable instances:
StaticSelectMenu.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
StaticSelectMenu.Builder
Builds instances of type
StaticSelectMenu. |
TYPE| Modifier and Type | Method and Description |
|---|---|
static StaticSelectMenu.Builder |
builder()
Creates a builder for
StaticSelectMenu. |
static StaticSelectMenu |
copyOf(StaticSelectMenuIF instance)
Creates an immutable copy of a
StaticSelectMenuIF value. |
boolean |
equals(Object another)
This instance is equal to all instances of
StaticSelectMenu that have equal attribute values. |
String |
getActionId() |
Optional<ConfirmationDialog> |
getConfirmationDialog() |
Optional<OptionOrOptionGroup> |
getInitialOption() |
List<OptionGroup> |
getOptionGroups() |
List<Option> |
getOptions() |
Text |
getPlaceholder() |
String |
getType() |
int |
hashCode()
Computes a hash code from attributes:
type, placeholder, actionId, options, optionGroups, initialOption, confirmationDialog. |
static StaticSelectMenu |
of(Text placeholder,
String actionId,
Iterable<? extends Option> options)
Construct a new immutable
StaticSelectMenu instance. |
static StaticSelectMenu |
of(Text placeholder,
String actionId,
List<Option> options)
Construct a new immutable
StaticSelectMenu instance. |
String |
toString()
Prints the immutable value
StaticSelectMenu with attribute values. |
StaticSelectMenu |
withActionId(String actionId)
Copy the current immutable object by setting a value for the
actionId attribute. |
StaticSelectMenu |
withConfirmationDialog(ConfirmationDialog value)
Copy the current immutable object by setting a present value for the optional
confirmationDialog attribute. |
StaticSelectMenu |
withConfirmationDialog(Optional<ConfirmationDialog> optional)
Copy the current immutable object by setting an optional value for the
confirmationDialog attribute. |
StaticSelectMenu |
withInitialOption(Optional<OptionOrOptionGroup> optional)
Copy the current immutable object by setting an optional value for the
initialOption attribute. |
StaticSelectMenu |
withInitialOption(OptionOrOptionGroup value)
Copy the current immutable object by setting a present value for the optional
initialOption attribute. |
StaticSelectMenu |
withOptionGroups(Iterable<? extends OptionGroup> elements)
Copy the current immutable object with elements that replace the content of
optionGroups. |
StaticSelectMenu |
withOptionGroups(OptionGroup... elements)
Copy the current immutable object with elements that replace the content of
optionGroups. |
StaticSelectMenu |
withOptions(Iterable<? extends Option> elements)
Copy the current immutable object with elements that replace the content of
options. |
StaticSelectMenu |
withOptions(Option... elements)
Copy the current immutable object with elements that replace the content of
options. |
StaticSelectMenu |
withPlaceholder(Text placeholder)
Copy the current immutable object by setting a value for the
placeholder attribute. |
public String getType()
getType in interface BlockElementgetType in interface StaticSelectMenuIFtype attributepublic Text getPlaceholder()
getPlaceholder in interface StaticSelectMenuIFplaceholder attributepublic String getActionId()
getActionId in interface StaticSelectMenuIFactionId attributepublic List<Option> getOptions()
getOptions in interface StaticSelectMenuIFoptions attributepublic List<OptionGroup> getOptionGroups()
getOptionGroups in interface StaticSelectMenuIFoptionGroups attributepublic Optional<OptionOrOptionGroup> getInitialOption()
getInitialOption in interface StaticSelectMenuIFinitialOption attributepublic Optional<ConfirmationDialog> getConfirmationDialog()
getConfirmationDialog in interface StaticSelectMenuIFconfirmationDialog attributepublic final StaticSelectMenu withPlaceholder(Text placeholder)
placeholder attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.placeholder - A new value for placeholderthis objectpublic final StaticSelectMenu withActionId(String actionId)
actionId attribute.
An equals check used to prevent copying of the same value by returning this.actionId - A new value for actionIdthis objectpublic final StaticSelectMenu withOptions(Option... elements)
options.elements - The elements to setthis objectpublic final StaticSelectMenu withOptions(Iterable<? extends Option> elements)
options.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of options elements to setthis objectpublic final StaticSelectMenu withOptionGroups(OptionGroup... elements)
optionGroups.elements - The elements to setthis objectpublic final StaticSelectMenu withOptionGroups(Iterable<? extends OptionGroup> elements)
optionGroups.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of optionGroups elements to setthis objectpublic final StaticSelectMenu withInitialOption(@Nullable OptionOrOptionGroup value)
initialOption attribute.value - The value for initialOption, null is accepted as java.util.Optional.empty()this objectpublic final StaticSelectMenu withInitialOption(Optional<OptionOrOptionGroup> optional)
initialOption attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for initialOptionthis objectpublic final StaticSelectMenu withConfirmationDialog(@Nullable ConfirmationDialog value)
confirmationDialog attribute.value - The value for confirmationDialog, null is accepted as java.util.Optional.empty()this objectpublic final StaticSelectMenu withConfirmationDialog(Optional<ConfirmationDialog> optional)
confirmationDialog attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for confirmationDialogthis objectpublic boolean equals(@Nullable Object another)
StaticSelectMenu that have equal attribute values.public int hashCode()
type, placeholder, actionId, options, optionGroups, initialOption, confirmationDialog.public String toString()
StaticSelectMenu with attribute values.public static StaticSelectMenu of(Text placeholder, String actionId, List<Option> options)
StaticSelectMenu instance.placeholder - The value for the placeholder attributeactionId - The value for the actionId attributeoptions - The value for the options attributepublic static StaticSelectMenu of(Text placeholder, String actionId, Iterable<? extends Option> options)
StaticSelectMenu instance.placeholder - The value for the placeholder attributeactionId - The value for the actionId attributeoptions - The value for the options attributepublic static StaticSelectMenu copyOf(StaticSelectMenuIF instance)
StaticSelectMenuIF value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static StaticSelectMenu.Builder builder()
StaticSelectMenu.Copyright © 2019. All rights reserved.