Class DialogSelectElement

java.lang.Object
com.slack.api.model.dialog.DialogSelectElement
All Implemented Interfaces:
DialogElement

public class DialogSelectElement
extends java.lang.Object
implements DialogElement
Represents a select dialog element

Use 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.

  • Constructor Details

  • Method Details

    • builder

    • getLabel

      public java.lang.String getLabel()
      Label displayed to user. Required. No more than 24 characters.
      Specified by:
      getLabel in interface DialogElement
    • getName

      public java.lang.String getName()
      Name of form element. Required. No more than 300 characters.
      Specified by:
      getName in interface DialogElement
    • getType

      public java.lang.String getType()
      Type of element. For a dropdown (select), the type is always select . It's required.
      Specified by:
      getType in interface DialogElement
      See Also:
      Dialog form elements
    • getValue

      public java.lang.String getValue()
      A default value for this field. Must match a value presented in DialogOptions.
      Specified by:
      getValue in interface DialogElement
    • getPlaceholder

      public java.lang.String getPlaceholder()
      A string displayed as needed to help guide users in completing the element. 150 character maximum.
      Specified by:
      getPlaceholder in interface DialogElement
    • isOptional

      public boolean isOptional()
      Provide true when the form element is not required. By default, form elements are required.
      Specified by:
      isOptional in interface DialogElement
    • getOptions

      public java.util.List<DialogOption> getOptions()
      Provide up to 100 option element attributes. Either options or option_groups is required for the static and external.
    • getSelectedOptions

      public java.util.List<DialogOption> getSelectedOptions()
      Provide a default selected value for dynamic select menus with a data_source of type external.
    • getOptionGroups

      public java.util.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 java.lang.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​(java.lang.String label)
      Label displayed to user. Required. No more than 24 characters.
      Specified by:
      setLabel in interface DialogElement
    • setName

      public void setName​(java.lang.String name)
      Name of form element. Required. No more than 300 characters.
      Specified by:
      setName in interface DialogElement
    • setValue

      public void setValue​(java.lang.String value)
      A default value for this field. Must match a value presented in DialogOptions.
      Specified by:
      setValue in interface DialogElement
    • setPlaceholder

      public void setPlaceholder​(java.lang.String placeholder)
      A string displayed as needed to help guide users in completing the element. 150 character maximum.
      Specified by:
      setPlaceholder in interface DialogElement
    • 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 interface DialogElement
    • setOptions

      public void setOptions​(java.util.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​(java.util.List<DialogOption> selectedOptions)
      Provide a default selected value for dynamic select menus with a data_source of type external.
    • setOptionGroups

      public void setOptionGroups​(java.util.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​(java.lang.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.
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • canEqual

      protected boolean canEqual​(java.lang.Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object