Class SlackFormOptionGroup.Builder

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

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

      public final SlackFormOptionGroup.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
    • setLabel

      public final SlackFormOptionGroup.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
    • addOptions

      public final SlackFormOptionGroup.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 SlackFormOptionGroup.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 SlackFormOptionGroup.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 SlackFormOptionGroup.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
    • build

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