@NotThreadSafe public static final class SlackFormTextElement.Builder extends Object
SlackFormTextElement.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
SlackFormTextElement |
build()
Builds a new
SlackFormTextElement. |
SlackFormTextElement.Builder |
from(AbstractSlackDialogFormTextElement instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.dialog.form.elements.AbstractSlackDialogFormTextElement instance. |
SlackFormTextElement.Builder |
from(AbstractSlackFormTextElement instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.dialog.form.elements.AbstractSlackFormTextElement instance. |
SlackFormTextElement.Builder |
from(SlackDialogFormElement instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.dialog.form.elements.SlackDialogFormElement instance. |
SlackFormTextElement.Builder |
setHint(Optional<String> hint)
Initializes the optional value
hint to hint. |
SlackFormTextElement.Builder |
setHint(String hint)
Initializes the optional value
hint to hint. |
SlackFormTextElement.Builder |
setLabel(String label)
Initializes the value for the
label attribute. |
SlackFormTextElement.Builder |
setMaxLength(int maxLength)
Initializes the value for the
maxLength attribute. |
SlackFormTextElement.Builder |
setMinLength(int minLength)
Initializes the value for the
minLength attribute. |
SlackFormTextElement.Builder |
setName(String name)
Initializes the value for the
name attribute. |
SlackFormTextElement.Builder |
setOptional(Boolean optional)
Initializes the optional value
optional to optional. |
SlackFormTextElement.Builder |
setOptional(Optional<Boolean> optional)
Initializes the optional value
optional to optional. |
SlackFormTextElement.Builder |
setPlaceholder(Optional<String> placeholder)
Initializes the optional value
placeholder to placeholder. |
SlackFormTextElement.Builder |
setPlaceholder(String placeholder)
Initializes the optional value
placeholder to placeholder. |
SlackFormTextElement.Builder |
setSubtype(Optional<SlackFormElementSubtypes> subtype)
Initializes the optional value
subtype to subtype. |
SlackFormTextElement.Builder |
setSubtype(SlackFormElementSubtypes subtype)
Initializes the optional value
subtype to subtype. |
SlackFormTextElement.Builder |
setType(SlackFormElementTypes type)
Initializes the value for the
type attribute. |
SlackFormTextElement.Builder |
setValue(Optional<String> value)
Initializes the optional value
value to value. |
SlackFormTextElement.Builder |
setValue(String value)
Initializes the optional value
value to value. |
public final SlackFormTextElement.Builder from(SlackDialogFormElement instance)
com.hubspot.slack.client.models.dialog.form.elements.SlackDialogFormElement instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackFormTextElement.Builder from(AbstractSlackFormTextElement instance)
com.hubspot.slack.client.models.dialog.form.elements.AbstractSlackFormTextElement instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackFormTextElement.Builder from(AbstractSlackDialogFormTextElement instance)
com.hubspot.slack.client.models.dialog.form.elements.AbstractSlackDialogFormTextElement instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackFormTextElement.Builder setType(SlackFormElementTypes type)
type attribute.
If not set, this attribute will have a default value as returned by the initializer of type.
type - The value for typethis builder for use in a chained invocationpublic final SlackFormTextElement.Builder setSubtype(@Nullable SlackFormElementSubtypes subtype)
subtype to subtype.subtype - The value for subtype, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackFormTextElement.Builder setSubtype(Optional<SlackFormElementSubtypes> subtype)
subtype to subtype.subtype - The value for subtypethis builder for use in a chained invocationpublic final SlackFormTextElement.Builder setHint(@Nullable String hint)
hint to hint.hint - The value for hint, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackFormTextElement.Builder setHint(Optional<String> hint)
hint to hint.hint - The value for hintthis builder for use in a chained invocationpublic final SlackFormTextElement.Builder setMinLength(int minLength)
minLength attribute.
If not set, this attribute will have a default value as returned by the initializer of minLength.
minLength - The value for minLengththis builder for use in a chained invocationpublic final SlackFormTextElement.Builder setMaxLength(int maxLength)
maxLength attribute.
If not set, this attribute will have a default value as returned by the initializer of maxLength.
maxLength - The value for maxLengththis builder for use in a chained invocationpublic final SlackFormTextElement.Builder setValue(@Nullable String value)
value to value.value - The value for value, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackFormTextElement.Builder setValue(Optional<String> value)
value to value.value - The value for valuethis builder for use in a chained invocationpublic final SlackFormTextElement.Builder setName(String name)
name attribute.name - The value for namethis builder for use in a chained invocationpublic final SlackFormTextElement.Builder setLabel(String label)
label attribute.label - The value for labelthis builder for use in a chained invocationpublic final SlackFormTextElement.Builder setPlaceholder(@Nullable String placeholder)
placeholder to placeholder.placeholder - The value for placeholder, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackFormTextElement.Builder setPlaceholder(Optional<String> placeholder)
placeholder to placeholder.placeholder - The value for placeholderthis builder for use in a chained invocationpublic final SlackFormTextElement.Builder setOptional(@Nullable Boolean optional)
optional to optional.optional - The value for optional, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackFormTextElement.Builder setOptional(Optional<Boolean> optional)
optional to optional.optional - The value for optionalthis builder for use in a chained invocationpublic SlackFormTextElement build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
SlackFormTextElement.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.