Class OptionsList.Builder

java.lang.Object
com.hubspot.slack.client.models.interaction.OptionsList.Builder
Enclosing class:
OptionsList

@Generated(from="OptionsListIF", generator="Immutables") @NotThreadSafe public static final class OptionsList.Builder extends Object
Builds instances of type OptionsList. 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 OptionsList.Builder from(OptionsListIF instance)
      Fill a builder with attribute values from the provided OptionsListIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • addOptions

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

      public final OptionsList.Builder addOptions(Option... 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 OptionsList.Builder setOptions(Iterable<? extends Option> 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 OptionsList.Builder addAllOptions(Iterable<? extends Option> elements)
      Adds elements to options list.
      Parameters:
      elements - An iterable of options elements
      Returns:
      this builder for use in a chained invocation
    • build

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