Class SlackFormSelectElement.Builder

java.lang.Object
com.hubspot.slack.client.models.dialog.form.elements.SlackFormSelectElement.Builder
Enclosing class:
SlackFormSelectElement

@Generated(from="AbstractSlackFormSelectElement", generator="Immutables") @NotThreadSafe public static final class SlackFormSelectElement.Builder extends Object
Builds instances of type SlackFormSelectElement. 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 SlackFormSelectElement.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.AbstractSlackFormSelectElement instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

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

      public final SlackFormSelectElement.Builder addOptions(SlackFormOption element)
      Adds one element to options list.
      Parameters:
      element - A options element
      Returns:
      this builder for use in a chained invocation
    • addOptions

      public final SlackFormSelectElement.Builder addOptions(SlackFormOption... elements)
      Adds elements to options list.
      Parameters:
      elements - An array of options elements
      Returns:
      this builder for use in a chained invocation
    • setOptions

      public final SlackFormSelectElement.Builder setOptions(Iterable<? extends SlackFormOption> elements)
      Sets or replaces all elements for options list.
      Parameters:
      elements - An iterable of options elements
      Returns:
      this builder for use in a chained invocation
    • addAllOptions

      public final SlackFormSelectElement.Builder addAllOptions(Iterable<? extends SlackFormOption> elements)
      Adds elements to options list.
      Parameters:
      elements - An iterable of options elements
      Returns:
      this builder for use in a chained invocation
    • setLabel

      public final SlackFormSelectElement.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 SlackFormSelectElement.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 SlackFormSelectElement.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 SlackFormSelectElement.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 SlackFormSelectElement.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 SlackFormSelectElement.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
    • 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
    • setDataSource

      public final SlackFormSelectElement.Builder setDataSource(SlackDataSource dataSource)
      Initializes the value for the dataSource attribute.

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

      Parameters:
      dataSource - The value for dataSource
      Returns:
      this builder for use in a chained invocation
    • addOptionGroups

      public final SlackFormSelectElement.Builder addOptionGroups(SlackFormOptionGroup element)
      Adds one element to optionGroups list.
      Parameters:
      element - A optionGroups element
      Returns:
      this builder for use in a chained invocation
    • addOptionGroups

      public final SlackFormSelectElement.Builder addOptionGroups(SlackFormOptionGroup... elements)
      Adds elements to optionGroups list.
      Parameters:
      elements - An array of optionGroups elements
      Returns:
      this builder for use in a chained invocation
    • setOptionGroups

      public final SlackFormSelectElement.Builder setOptionGroups(Iterable<? extends SlackFormOptionGroup> elements)
      Sets or replaces all elements for optionGroups list.
      Parameters:
      elements - An iterable of optionGroups elements
      Returns:
      this builder for use in a chained invocation
    • addAllOptionGroups

      public final SlackFormSelectElement.Builder addAllOptionGroups(Iterable<? extends SlackFormOptionGroup> elements)
      Adds elements to optionGroups list.
      Parameters:
      elements - An iterable of optionGroups elements
      Returns:
      this builder for use in a chained invocation
    • setValue

      public final SlackFormSelectElement.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 SlackFormSelectElement.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
    • addSelectedOptions

      public final SlackFormSelectElement.Builder addSelectedOptions(SlackFormOption element)
      Adds one element to selectedOptions list.
      Parameters:
      element - A selectedOptions element
      Returns:
      this builder for use in a chained invocation
    • addSelectedOptions

      public final SlackFormSelectElement.Builder addSelectedOptions(SlackFormOption... elements)
      Adds elements to selectedOptions list.
      Parameters:
      elements - An array of selectedOptions elements
      Returns:
      this builder for use in a chained invocation
    • setSelectedOptions

      public final SlackFormSelectElement.Builder setSelectedOptions(Iterable<? extends SlackFormOption> elements)
      Sets or replaces all elements for selectedOptions list.
      Parameters:
      elements - An iterable of selectedOptions elements
      Returns:
      this builder for use in a chained invocation
    • addAllSelectedOptions

      public final SlackFormSelectElement.Builder addAllSelectedOptions(Iterable<? extends SlackFormOption> elements)
      Adds elements to selectedOptions list.
      Parameters:
      elements - An iterable of selectedOptions elements
      Returns:
      this builder for use in a chained invocation
    • setMinQueryLength

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

      public final SlackFormSelectElement.Builder setMinQueryLength(Optional<Integer> minQueryLength)
      Initializes the optional value minQueryLength to minQueryLength.
      Parameters:
      minQueryLength - The value for minQueryLength
      Returns:
      this builder for use in a chained invocation
    • build

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