Package com.slack.api.model.dialog
Class DialogTextElement
java.lang.Object
com.slack.api.model.dialog.DialogTextElement
- All Implemented Interfaces:
DialogElement
public class DialogTextElement extends Object implements DialogElement
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDialogTextElement.DialogTextElementBuilder -
Field Summary
Fields Modifier and Type Field Description intmaxLengthMaximum input length allowed for element. -
Constructor Summary
Constructors Constructor Description DialogTextElement()DialogTextElement(String label, String name, String value, String placeholder, boolean optional, int maxLength, int minLength, String hint, DialogSubType subtype) -
Method Summary
Modifier and Type Method Description static DialogTextElement.DialogTextElementBuilderbuilder()protected booleancanEqual(Object other)booleanequals(Object o)StringgetHint()Helpful text provided to assist users in answering a question.StringgetLabel()Label displayed to user.intgetMaxLength()Maximum input length allowed for element.intgetMinLength()Minimum input length allowed for element.StringgetName()Name of form element.StringgetPlaceholder()A string displayed as needed to help guide users in completing the element.DialogSubTypegetSubtype()Subtype for this text type element (e.g.StringgetType()Type of element.StringgetValue()A default value for this field.inthashCode()booleanisOptional()Providetruewhen the form element is not required.voidsetHint(String hint)Helpful text provided to assist users in answering a question.voidsetLabel(String label)Label displayed to user.voidsetMaxLength(int maxLength)Maximum input length allowed for element.voidsetMinLength(int minLength)Minimum input length allowed for element.voidsetName(String name)Name of form element.voidsetOptional(boolean optional)Providetruewhen the form element is not required.voidsetPlaceholder(String placeholder)A string displayed as needed to help guide users in completing the element.voidsetSubtype(DialogSubType subtype)Subtype for this text type element (e.g.voidsetValue(String value)A default value for this field.StringtoString()
-
Field Details
-
maxLength
public int maxLengthMaximum input length allowed for element. Up to 150 characters. Defaults to 150.
-
-
Constructor Details
-
DialogTextElement
public DialogTextElement() -
DialogTextElement
-
-
Method Details
-
builder
-
getLabel
Label displayed to user. Required. No more than 24 characters.- Specified by:
getLabelin interfaceDialogElement
-
getName
Name of form element. Required. No more than 300 characters.- Specified by:
getNamein interfaceDialogElement
-
getType
Type of element. For a text element, the type is alwaystext. It's required.- Specified by:
getTypein interfaceDialogElement- See Also:
- Dialog form elements
-
getValue
A default value for this field. Up to 500 characters.- Specified by:
getValuein interfaceDialogElement
-
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()Providetruewhen the form element is not required. By default, form elements are required.- Specified by:
isOptionalin interfaceDialogElement
-
getMaxLength
public int getMaxLength()Maximum input length allowed for element. Up to 150 characters. Defaults to 150. -
getMinLength
public int getMinLength()Minimum input length allowed for element. Typetext: Up to 150 characters. Defaults to 0. -
getHint
Helpful text provided to assist users in answering a question. Up to 150 characters. -
getSubtype
Subtype for this text type element (e.g. Number) -
setLabel
Label displayed to user. Required. No more than 24 characters.- Specified by:
setLabelin interfaceDialogElement
-
setName
Name of form element. Required. No more than 300 characters.- Specified by:
setNamein interfaceDialogElement
-
setValue
A default value for this field. Up to 500 characters.- Specified by:
setValuein interfaceDialogElement
-
setPlaceholder
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)Providetruewhen the form element is not required. By default, form elements are required.- Specified by:
setOptionalin interfaceDialogElement
-
setMaxLength
public void setMaxLength(int maxLength)Maximum input length allowed for element. Up to 150 characters. Defaults to 150. -
setMinLength
public void setMinLength(int minLength)Minimum input length allowed for element. Typetext: Up to 150 characters. Defaults to 0. -
setHint
Helpful text provided to assist users in answering a question. Up to 150 characters. -
setSubtype
Subtype for this text type element (e.g. Number) -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-