Package com.slack.api.model.dialog
Class DialogTextElement.DialogTextElementBuilder
- java.lang.Object
-
- com.slack.api.model.dialog.DialogTextElement.DialogTextElementBuilder
-
- Enclosing class:
- DialogTextElement
public static class DialogTextElement.DialogTextElementBuilder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DialogTextElement
build()
DialogTextElement.DialogTextElementBuilder
hint(String hint)
Helpful text provided to assist users in answering a question.DialogTextElement.DialogTextElementBuilder
label(String label)
Label displayed to user.DialogTextElement.DialogTextElementBuilder
maxLength(int maxLength)
Maximum input length allowed for element.DialogTextElement.DialogTextElementBuilder
minLength(int minLength)
Minimum input length allowed for element.DialogTextElement.DialogTextElementBuilder
name(String name)
Name of form element.DialogTextElement.DialogTextElementBuilder
optional(boolean optional)
Providetrue
when the form element is not required.DialogTextElement.DialogTextElementBuilder
placeholder(String placeholder)
A string displayed as needed to help guide users in completing the element.DialogTextElement.DialogTextElementBuilder
subtype(DialogSubType subtype)
Subtype for this text type element (e.g.String
toString()
DialogTextElement.DialogTextElementBuilder
value(String value)
A default value for this field.
-
-
-
Method Detail
-
label
public DialogTextElement.DialogTextElementBuilder label(String label)
Label displayed to user. Required. No more than 24 characters.- Returns:
this
.
-
name
public DialogTextElement.DialogTextElementBuilder name(String name)
Name of form element. Required. No more than 300 characters.- Returns:
this
.
-
value
public DialogTextElement.DialogTextElementBuilder value(String value)
A default value for this field. Up to 500 characters.- Returns:
this
.
-
placeholder
public DialogTextElement.DialogTextElementBuilder placeholder(String placeholder)
A string displayed as needed to help guide users in completing the element. 150 character maximum.- Returns:
this
.
-
optional
public DialogTextElement.DialogTextElementBuilder optional(boolean optional)
Providetrue
when the form element is not required. By default, form elements are required.- Returns:
this
.
-
maxLength
public DialogTextElement.DialogTextElementBuilder maxLength(int maxLength)
Maximum input length allowed for element. Up to 150 characters. Defaults to 150.- Returns:
this
.
-
minLength
public DialogTextElement.DialogTextElementBuilder minLength(int minLength)
Minimum input length allowed for element. Typetext
: Up to 150 characters. Defaults to 0.- Returns:
this
.
-
hint
public DialogTextElement.DialogTextElementBuilder hint(String hint)
Helpful text provided to assist users in answering a question. Up to 150 characters.- Returns:
this
.
-
subtype
public DialogTextElement.DialogTextElementBuilder subtype(DialogSubType subtype)
Subtype for this text type element (e.g. Number)- Returns:
this
.
-
build
public DialogTextElement build()
-
-