Class SlackFormTextElement.Builder
java.lang.Object
com.hubspot.slack.client.models.dialog.form.elements.SlackFormTextElement.Builder
- Enclosing class:
SlackFormTextElement
@Generated(from="AbstractSlackFormTextElement",
generator="Immutables")
@NotThreadSafe
public static final class SlackFormTextElement.Builder
extends Object
Builds instances of type
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.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newSlackFormTextElement.from(AbstractSlackDialogFormTextElement instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.AbstractSlackDialogFormTextElementinstance.from(AbstractSlackFormTextElement instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.AbstractSlackFormTextElementinstance.Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.HasLabelinstance.from(SlackDialogFormElement instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.SlackDialogFormElementinstance.Initializes the optional valuehintto hint.Initializes the optional valuehintto hint.Initializes the value for thelabelattribute.setMaxLength(int maxLength) Initializes the value for themaxLengthattribute.setMinLength(int minLength) Initializes the value for theminLengthattribute.Initializes the value for thenameattribute.setOptional(Boolean optional) Initializes the optional valueoptionalto optional.setOptional(Optional<Boolean> optional) Initializes the optional valueoptionalto optional.setPlaceholder(String placeholder) Initializes the optional valueplaceholderto placeholder.setPlaceholder(Optional<String> placeholder) Initializes the optional valueplaceholderto placeholder.setSubtype(SlackFormElementSubtypes subtype) Initializes the optional valuesubtypeto subtype.setSubtype(Optional<? extends SlackFormElementSubtypes> subtype) Initializes the optional valuesubtypeto subtype.setType(SlackFormElementTypes type) Initializes the value for thetypeattribute.Initializes the optional valuevalueto value.Initializes the optional valuevalueto value.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.HasLabelinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.SlackDialogFormElementinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.AbstractSlackFormTextElementinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.AbstractSlackDialogFormTextElementinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setLabel
Initializes the value for thelabelattribute.- Parameters:
label- The value for label- Returns:
thisbuilder for use in a chained invocation
-
setName
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
setPlaceholder
Initializes the optional valueplaceholderto placeholder.- Parameters:
placeholder- The value for placeholder,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setPlaceholder
Initializes the optional valueplaceholderto placeholder.- Parameters:
placeholder- The value for placeholder- Returns:
thisbuilder for use in a chained invocation
-
setOptional
Initializes the optional valueoptionalto optional.- Parameters:
optional- The value for optional,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setOptional
Initializes the optional valueoptionalto optional.- Parameters:
optional- The value for optional- Returns:
thisbuilder for use in a chained invocation
-
setSubtype
Initializes the optional valuesubtypeto subtype.- Parameters:
subtype- The value for subtype,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setSubtype
public final SlackFormTextElement.Builder setSubtype(Optional<? extends SlackFormElementSubtypes> subtype) Initializes the optional valuesubtypeto subtype.- Parameters:
subtype- The value for subtype- Returns:
thisbuilder for use in a chained invocation
-
setHint
Initializes the optional valuehintto hint.- Parameters:
hint- The value for hint,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setHint
Initializes the optional valuehintto hint.- Parameters:
hint- The value for hint- Returns:
thisbuilder for use in a chained invocation
-
setMinLength
Initializes the value for theminLengthattribute.If not set, this attribute will have a default value as returned by the initializer of
minLength.- Parameters:
minLength- The value for minLength- Returns:
thisbuilder for use in a chained invocation
-
setMaxLength
Initializes the value for themaxLengthattribute.If not set, this attribute will have a default value as returned by the initializer of
maxLength.- Parameters:
maxLength- The value for maxLength- Returns:
thisbuilder for use in a chained invocation
-
setValue
Initializes the optional valuevalueto value.- Parameters:
value- The value for value,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setValue
Initializes the optional valuevalueto value.- Parameters:
value- The value for value- Returns:
thisbuilder for use in a chained invocation
-
setType
Initializes the value for thetypeattribute.If not set, this attribute will have a default value as returned by the initializer of
type.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackFormTextElement.- Returns:
- An immutable instance of SlackFormTextElement
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-