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
All Methods Static Methods Instance Methods Concrete Methods 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()
-
-
-
Method Detail
-
builder
public static DialogTextElement.DialogTextElementBuilder 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 text element, the type is alwaystext. It's required.- Specified by:
getTypein interfaceDialogElement- See Also:
- Dialog form elements
-
getValue
public String getValue()
A default value for this field. Up to 500 characters.- 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()
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
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:
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. Up to 500 characters.- 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)
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
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)
-
canEqual
protected boolean canEqual(Object other)
-
-