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 Details

    • from

      public final SlackFormTextElement.Builder from(HasLabel instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.dialog.form.elements.HasLabel instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.dialog.form.elements.SlackDialogFormElement instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.dialog.form.elements.AbstractSlackFormTextElement instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.dialog.form.elements.AbstractSlackDialogFormTextElement instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setLabel

      public final SlackFormTextElement.Builder setLabel(String label)
      Initializes the value for the label attribute.
      Parameters:
      label - The value for label
      Returns:
      this builder for use in a chained invocation
    • setName

      public final SlackFormTextElement.Builder setName(String name)
      Initializes the value for the name attribute.
      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
    • setPlaceholder

      public final SlackFormTextElement.Builder setPlaceholder(@Nullable String placeholder)
      Initializes the optional value placeholder to placeholder.
      Parameters:
      placeholder - The value for placeholder, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setPlaceholder

      public final SlackFormTextElement.Builder setPlaceholder(Optional<String> placeholder)
      Initializes the optional value placeholder to placeholder.
      Parameters:
      placeholder - The value for placeholder
      Returns:
      this builder for use in a chained invocation
    • setOptional

      public final SlackFormTextElement.Builder setOptional(@Nullable Boolean optional)
      Initializes the optional value optional to optional.
      Parameters:
      optional - The value for optional, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setOptional

      public final SlackFormTextElement.Builder setOptional(Optional<Boolean> optional)
      Initializes the optional value optional to optional.
      Parameters:
      optional - The value for optional
      Returns:
      this builder for use in a chained invocation
    • setSubtype

      public final SlackFormTextElement.Builder setSubtype(@Nullable SlackFormElementSubtypes subtype)
      Initializes the optional value subtype to subtype.
      Parameters:
      subtype - The value for subtype, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setSubtype

      public final SlackFormTextElement.Builder setSubtype(Optional<? extends SlackFormElementSubtypes> subtype)
      Initializes the optional value subtype to subtype.
      Parameters:
      subtype - The value for subtype
      Returns:
      this builder for use in a chained invocation
    • setHint

      public final SlackFormTextElement.Builder setHint(@Nullable String hint)
      Initializes the optional value hint to hint.
      Parameters:
      hint - The value for hint, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setHint

      public final SlackFormTextElement.Builder setHint(Optional<String> hint)
      Initializes the optional value hint to hint.
      Parameters:
      hint - The value for hint
      Returns:
      this builder for use in a chained invocation
    • setMinLength

      public final SlackFormTextElement.Builder setMinLength(int minLength)
      Initializes the value for the minLength attribute.

      If not set, this attribute will have a default value as returned by the initializer of minLength.

      Parameters:
      minLength - The value for minLength
      Returns:
      this builder for use in a chained invocation
    • setMaxLength

      public final SlackFormTextElement.Builder setMaxLength(int maxLength)
      Initializes the value for the maxLength attribute.

      If not set, this attribute will have a default value as returned by the initializer of maxLength.

      Parameters:
      maxLength - The value for maxLength
      Returns:
      this builder for use in a chained invocation
    • setValue

      public final SlackFormTextElement.Builder setValue(@Nullable String value)
      Initializes the optional value value to value.
      Parameters:
      value - The value for value, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setValue

      public final SlackFormTextElement.Builder setValue(Optional<String> value)
      Initializes the optional value value to value.
      Parameters:
      value - The value for value
      Returns:
      this builder for use in a chained invocation
    • setType

      Initializes the value for the type attribute.

      If not set, this attribute will have a default value as returned by the initializer of type.

      Parameters:
      type - The value for type
      Returns:
      this builder for use in a chained invocation
    • build

      public SlackFormTextElement build()
      Builds a new SlackFormTextElement.
      Returns:
      An immutable instance of SlackFormTextElement
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing