Package com.slack.api.model.dialog
Class DialogSelectElement
- java.lang.Object
-
- com.slack.api.model.dialog.DialogSelectElement
-
- All Implemented Interfaces:
DialogElement
public class DialogSelectElement extends Object implements DialogElement
Represents a select dialog elementUse the
selectelement for multiple choice selections allowing users to pick a single item from a list. True to web roots, this selection is displayed as a dropdown menu.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDialogSelectElement.DialogSelectElementBuilder
-
Constructor Summary
Constructors Constructor Description DialogSelectElement()DialogSelectElement(String label, String name, String value, String placeholder, boolean optional, List<DialogOption> options, List<DialogOption> selectedOptions, List<DialogOptionGroup> optionGroups, Integer minQueryLength, DialogDataSourceType dataSource)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DialogSelectElement.DialogSelectElementBuilderbuilder()protected booleancanEqual(Object other)booleanequals(Object o)DialogDataSourceTypegetDataSource()Provide the data source type for the Element.StringgetLabel()Label displayed to user.IntegergetMinQueryLength()Provide the number of characters that must be typed by a user.StringgetName()Name of form element.List<DialogOptionGroup>getOptionGroups()Provide up to 100 option group element attributes.List<DialogOption>getOptions()Provide up to 100 option element attributes.StringgetPlaceholder()A string displayed as needed to help guide users in completing the element.List<DialogOption>getSelectedOptions()Provide a default selected value for dynamic select menus with a data_source of type external.StringgetType()Type of element.StringgetValue()A default value for this field.inthashCode()booleanisOptional()Provide true when the form element is not required.voidsetDataSource(DialogDataSourceType dataSource)Provide the data source type for the Element.voidsetLabel(String label)Label displayed to user.voidsetMinQueryLength(Integer minQueryLength)Provide the number of characters that must be typed by a user.voidsetName(String name)Name of form element.voidsetOptional(boolean optional)Provide true when the form element is not required.voidsetOptionGroups(List<DialogOptionGroup> optionGroups)Provide up to 100 option group element attributes.voidsetOptions(List<DialogOption> options)Provide up to 100 option element attributes.voidsetPlaceholder(String placeholder)A string displayed as needed to help guide users in completing the element.voidsetSelectedOptions(List<DialogOption> selectedOptions)Provide a default selected value for dynamic select menus with a data_source of type external.voidsetValue(String value)A default value for this field.StringtoString()
-
-
-
Constructor Detail
-
DialogSelectElement
public DialogSelectElement()
-
DialogSelectElement
public DialogSelectElement(String label, String name, String value, String placeholder, boolean optional, List<DialogOption> options, List<DialogOption> selectedOptions, List<DialogOptionGroup> optionGroups, Integer minQueryLength, DialogDataSourceType dataSource)
-
-
Method Detail
-
builder
public static DialogSelectElement.DialogSelectElementBuilder builder()
-
getLabel
public String getLabel()
Label displayed to user. Required. No more than 24 characters.- Specified by:
getLabelin interfaceDialogElement
-
getName
public String getName()
Name of form element. Required. No more than 300 characters.- Specified by:
getNamein interfaceDialogElement
-
getType
public String getType()
Type of element. For a dropdown (select), the type is alwaysselect. It's required.- Specified by:
getTypein interfaceDialogElement- See Also:
- Dialog form elements
-
getValue
public String getValue()
A default value for this field. Must match a value presented inDialogOptions.- Specified by:
getValuein interfaceDialogElement
-
getPlaceholder
public String getPlaceholder()
A string displayed as needed to help guide users in completing the element. 150 character maximum.- Specified by:
getPlaceholderin interfaceDialogElement
-
isOptional
public boolean isOptional()
Provide true when the form element is not required. By default, form elements are required.- Specified by:
isOptionalin interfaceDialogElement
-
getOptions
public List<DialogOption> getOptions()
Provide up to 100 option element attributes. Either options or option_groups is required for the static and external.
-
getSelectedOptions
public List<DialogOption> getSelectedOptions()
Provide a default selected value for dynamic select menus with a data_source of type external.
-
getOptionGroups
public List<DialogOptionGroup> getOptionGroups()
Provide up to 100 option group element attributes. Either options or option_groups is required for the static and external.
-
getMinQueryLength
public Integer getMinQueryLength()
Provide the number of characters that must be typed by a user.
-
getDataSource
public DialogDataSourceType getDataSource()
Provide the data source type for the Element.
-
setLabel
public void setLabel(String label)
Label displayed to user. Required. No more than 24 characters.- Specified by:
setLabelin interfaceDialogElement
-
setName
public void setName(String name)
Name of form element. Required. No more than 300 characters.- Specified by:
setNamein interfaceDialogElement
-
setValue
public void setValue(String value)
A default value for this field. Must match a value presented inDialogOptions.- Specified by:
setValuein interfaceDialogElement
-
setPlaceholder
public void setPlaceholder(String placeholder)
A string displayed as needed to help guide users in completing the element. 150 character maximum.- Specified by:
setPlaceholderin interfaceDialogElement
-
setOptional
public void setOptional(boolean optional)
Provide true when the form element is not required. By default, form elements are required.- Specified by:
setOptionalin interfaceDialogElement
-
setOptions
public void setOptions(List<DialogOption> options)
Provide up to 100 option element attributes. Either options or option_groups is required for the static and external.
-
setSelectedOptions
public void setSelectedOptions(List<DialogOption> selectedOptions)
Provide a default selected value for dynamic select menus with a data_source of type external.
-
setOptionGroups
public void setOptionGroups(List<DialogOptionGroup> optionGroups)
Provide up to 100 option group element attributes. Either options or option_groups is required for the static and external.
-
setMinQueryLength
public void setMinQueryLength(Integer minQueryLength)
Provide the number of characters that must be typed by a user.
-
setDataSource
public void setDataSource(DialogDataSourceType dataSource)
Provide the data source type for the Element.
-
canEqual
protected boolean canEqual(Object other)
-
-