Class StaticSelectMenu
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.StaticSelectMenu
- All Implemented Interfaces:
BlockElement,HasActionId,StaticSelectMenuIF
@Generated(from="StaticSelectMenuIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class StaticSelectMenu
extends Object
implements StaticSelectMenuIF
Immutable implementation of
StaticSelectMenuIF.
Use the builder to create immutable instances:
StaticSelectMenu.builder().
Use the static factory method to create immutable instances:
StaticSelectMenu.of().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.StaticSelectMenuIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic StaticSelectMenu.Builderbuilder()Creates a builder forStaticSelectMenu.static StaticSelectMenucopyOf(StaticSelectMenuIF instance) Creates an immutable copy of aStaticSelectMenuIFvalue.booleanThis instance is equal to all instances ofStaticSelectMenuthat have equal attribute values.getType()inthashCode()Computes a hash code from attributes:type,placeholder,actionId,options,optionGroups,initialOption,confirmationDialog.static StaticSelectMenuConstruct a new immutableStaticSelectMenuinstance.static StaticSelectMenuConstruct a new immutableStaticSelectMenuinstance.toString()Prints the immutable valueStaticSelectMenuwith attribute values.final StaticSelectMenuwithActionId(String value) Copy the current immutable object by setting a value for theactionIdattribute.final StaticSelectMenuCopy the current immutable object by setting a present value for the optionalconfirmationDialogattribute.final StaticSelectMenuwithConfirmationDialog(Optional<? extends ConfirmationDialog> optional) Copy the current immutable object by setting an optional value for theconfirmationDialogattribute.final StaticSelectMenuCopy the current immutable object by setting a present value for the optionalinitialOptionattribute.final StaticSelectMenuwithInitialOption(Optional<? extends OptionOrOptionGroup> optional) Copy the current immutable object by setting an optional value for theinitialOptionattribute.final StaticSelectMenuwithOptionGroups(OptionGroup... elements) Copy the current immutable object with elements that replace the content ofoptionGroups.final StaticSelectMenuwithOptionGroups(Iterable<? extends OptionGroup> elements) Copy the current immutable object with elements that replace the content ofoptionGroups.final StaticSelectMenuwithOptions(Option... elements) Copy the current immutable object with elements that replace the content ofoptions.final StaticSelectMenuwithOptions(Iterable<? extends Option> elements) Copy the current immutable object with elements that replace the content ofoptions.final StaticSelectMenuwithPlaceholder(Text value) Copy the current immutable object by setting a value for theplaceholderattribute.Methods inherited from interface com.hubspot.slack.client.models.blocks.elements.StaticSelectMenuIF
validate
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceStaticSelectMenuIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getPlaceholder
- Specified by:
getPlaceholderin interfaceStaticSelectMenuIF- Returns:
- The value of the
placeholderattribute
-
getActionId
- Specified by:
getActionIdin interfaceHasActionId- Specified by:
getActionIdin interfaceStaticSelectMenuIF- Returns:
- The value of the
actionIdattribute
-
getOptions
- Specified by:
getOptionsin interfaceStaticSelectMenuIF- Returns:
- The value of the
optionsattribute
-
getOptionGroups
- Specified by:
getOptionGroupsin interfaceStaticSelectMenuIF- Returns:
- The value of the
optionGroupsattribute
-
getInitialOption
- Specified by:
getInitialOptionin interfaceStaticSelectMenuIF- Returns:
- The value of the
initialOptionattribute
-
getConfirmationDialog
- Specified by:
getConfirmationDialogin interfaceStaticSelectMenuIF- Returns:
- The value of the
confirmationDialogattribute
-
withPlaceholder
Copy the current immutable object by setting a value for theplaceholderattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for placeholder- Returns:
- A modified copy or the
thisobject
-
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
-
withOptionGroups
Copy the current immutable object with elements that replace the content ofoptionGroups.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withOptionGroups
Copy the current immutable object with elements that replace the content ofoptionGroups. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of optionGroups elements to set- Returns:
- A modified copy or
thisif not changed
-
withInitialOption
Copy the current immutable object by setting a present value for the optionalinitialOptionattribute.- Parameters:
value- The value for initialOption,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withInitialOption
Copy the current immutable object by setting an optional value for theinitialOptionattribute. 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 initialOption- 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
public final StaticSelectMenu withConfirmationDialog(Optional<? extends ConfirmationDialog> optional) 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 ofStaticSelectMenuthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,placeholder,actionId,options,optionGroups,initialOption,confirmationDialog. -
toString
Prints the immutable valueStaticSelectMenuwith attribute values. -
of
Construct a new immutableStaticSelectMenuinstance.- Parameters:
placeholder- The value for theplaceholderattributeactionId- The value for theactionIdattributeoptions- The value for theoptionsattribute- Returns:
- An immutable StaticSelectMenu instance
-
of
public static StaticSelectMenu of(Text placeholder, String actionId, Iterable<? extends Option> options) Construct a new immutableStaticSelectMenuinstance.- Parameters:
placeholder- The value for theplaceholderattributeactionId- The value for theactionIdattributeoptions- The value for theoptionsattribute- Returns:
- An immutable StaticSelectMenu instance
-
copyOf
Creates an immutable copy of aStaticSelectMenuIFvalue. 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 StaticSelectMenu instance
-
builder
Creates a builder forStaticSelectMenu.StaticSelectMenu.builder() .setPlaceholder(com.hubspot.slack.client.models.blocks.objects.Text) // requiredplaceholder.setActionId(String) // requiredactionId.addOptions|addAllOptions(com.hubspot.slack.client.models.blocks.objects.Option) //optionselements .addOptionGroups|addAllOptionGroups(com.hubspot.slack.client.models.blocks.objects.OptionGroup) //optionGroupselements .setInitialOption(Optional<com.hubspot.slack.client.models.blocks.objects.OptionOrOptionGroup>) // optionalinitialOption.setConfirmationDialog(Optional<com.hubspot.slack.client.models.blocks.objects.ConfirmationDialog>) // optionalconfirmationDialog.build();- Returns:
- A new StaticSelectMenu builder
-