Class InputErrors.Builder

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

@Generated(from="InputErrorsIF", generator="Immutables") @NotThreadSafe public static final class InputErrors.Builder extends Object
Builds instances of type InputErrors. 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 InputErrors.Builder from(InputErrorsIF instance)
      Fill a builder with attribute values from the provided InputErrorsIF 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
    • addErrors

      public final InputErrors.Builder addErrors(InputError element)
      Adds one element to errors list.
      Parameters:
      element - A errors element
      Returns:
      this builder for use in a chained invocation
    • addErrors

      public final InputErrors.Builder addErrors(InputError... elements)
      Adds elements to errors list.
      Parameters:
      elements - An array of errors elements
      Returns:
      this builder for use in a chained invocation
    • setErrors

      public final InputErrors.Builder setErrors(Iterable<? extends InputError> elements)
      Sets or replaces all elements for errors list.
      Parameters:
      elements - An iterable of errors elements
      Returns:
      this builder for use in a chained invocation
    • addAllErrors

      public final InputErrors.Builder addAllErrors(Iterable<? extends InputError> elements)
      Adds elements to errors list.
      Parameters:
      elements - An iterable of errors elements
      Returns:
      this builder for use in a chained invocation
    • build

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