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
select
element 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 class
DialogSelectElement.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.DialogSelectElementBuilder
builder()
protected boolean
canEqual(Object other)
boolean
equals(Object o)
DialogDataSourceType
getDataSource()
Provide the data source type for the Element.String
getLabel()
Label displayed to user.Integer
getMinQueryLength()
Provide the number of characters that must be typed by a user.String
getName()
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.String
getPlaceholder()
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.String
getType()
Type of element.String
getValue()
A default value for this field.int
hashCode()
boolean
isOptional()
Provide true when the form element is not required.void
setDataSource(DialogDataSourceType dataSource)
Provide the data source type for the Element.void
setLabel(String label)
Label displayed to user.void
setMinQueryLength(Integer minQueryLength)
Provide the number of characters that must be typed by a user.void
setName(String name)
Name of form element.void
setOptional(boolean optional)
Provide true when the form element is not required.void
setOptionGroups(List<DialogOptionGroup> optionGroups)
Provide up to 100 option group element attributes.void
setOptions(List<DialogOption> options)
Provide up to 100 option element attributes.void
setPlaceholder(String placeholder)
A string displayed as needed to help guide users in completing the element.void
setSelectedOptions(List<DialogOption> selectedOptions)
Provide a default selected value for dynamic select menus with a data_source of type external.void
setValue(String value)
A default value for this field.String
toString()
-
-
-
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:
getLabel
in interfaceDialogElement
-
getName
public String getName()
Name of form element. Required. No more than 300 characters.- Specified by:
getName
in interfaceDialogElement
-
getType
public String getType()
Type of element. For a dropdown (select), the type is alwaysselect
. It's required.- Specified by:
getType
in interfaceDialogElement
- See Also:
- Dialog form elements
-
getValue
public String getValue()
A default value for this field. Must match a value presented inDialogOption
s.- Specified by:
getValue
in interfaceDialogElement
-
getPlaceholder
public String getPlaceholder()
A string displayed as needed to help guide users in completing the element. 150 character maximum.- Specified by:
getPlaceholder
in interfaceDialogElement
-
isOptional
public boolean isOptional()
Provide true when the form element is not required. By default, form elements are required.- Specified by:
isOptional
in 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:
setLabel
in interfaceDialogElement
-
setName
public void setName(String name)
Name of form element. Required. No more than 300 characters.- Specified by:
setName
in interfaceDialogElement
-
setValue
public void setValue(String value)
A default value for this field. Must match a value presented inDialogOption
s.- Specified by:
setValue
in 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:
setPlaceholder
in interfaceDialogElement
-
setOptional
public void setOptional(boolean optional)
Provide true when the form element is not required. By default, form elements are required.- Specified by:
setOptional
in 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)
-
-