Class DialogTextAreaElement

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

public class DialogTextAreaElement extends Object implements DialogElement
Represents a textarea dialog element

A textarea is a multi-line plain text editing control. You've likely encountered these on the world wide web. Use this element if you want a relatively long answer from users.

  • Field Details

    • maxLength

      public int maxLength
      Maximum input length allowed for element. 0-500 characters. Defaults to 150.
  • Constructor Details

    • DialogTextAreaElement

      public DialogTextAreaElement()
    • DialogTextAreaElement

      public DialogTextAreaElement(String label, String name, String value, String placeholder, boolean optional, int maxLength, int minLength, String hint, DialogSubType subtype)
  • Method Details

    • builder

    • getLabel

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

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

      public String getType()
      Type of element. For a textarea, the type is always textarea . It's required.
      Specified by:
      getType in interface DialogElement
      See Also:
    • getValue

      public String getValue()
      A default value for this field. Up to 500 characters.
      Specified by:
      getValue in interface DialogElement
    • getPlaceholder

      public 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
    • getMaxLength

      public int getMaxLength()
      Maximum input length allowed for element. 0-500 characters. Defaults to 150.
    • getMinLength

      public int getMinLength()
      Minimum input length allowed for element. 1-500 characters. Defaults to 0.
    • getHint

      public String getHint()
      Helpful text provided to assist users in answering a question. Up to 150 characters.
    • getSubtype

      public DialogSubType getSubtype()
      Subtype for this text type element (e.g. Number)
    • setLabel

      public void setLabel(String label)
      Label displayed to user. Required. No more than 24 characters.
      Specified by:
      setLabel in interface DialogElement
    • setName

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

      public void setValue(String value)
      A default value for this field. Up to 500 characters.
      Specified by:
      setValue in interface DialogElement
    • 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 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
    • setMaxLength

      public void setMaxLength(int maxLength)
      Maximum input length allowed for element. 0-500 characters. Defaults to 150.
    • setMinLength

      public void setMinLength(int minLength)
      Minimum input length allowed for element. 1-500 characters. Defaults to 0.
    • setHint

      public void setHint(String hint)
      Helpful text provided to assist users in answering a question. Up to 150 characters.
    • setSubtype

      public void setSubtype(DialogSubType subtype)
      Subtype for this text type element (e.g. Number)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object