Class SlackErrorResponse.Builder

java.lang.Object
com.hubspot.slack.client.models.response.SlackErrorResponse.Builder
Enclosing class:
SlackErrorResponse

@Generated(from="SlackErrorResponseIF", generator="Immutables") @NotThreadSafe public static final class SlackErrorResponse.Builder extends Object
Builds instances of type SlackErrorResponse. 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 SlackErrorResponse.Builder from(SlackErrorResponseIF instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.response.SlackErrorResponseIF instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

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

      public final SlackErrorResponse.Builder setOk(boolean ok)
      Initializes the value for the ok attribute.
      Parameters:
      ok - The value for ok
      Returns:
      this builder for use in a chained invocation
    • setResponseMetadata

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

      public final SlackErrorResponse.Builder setResponseMetadata(Optional<? extends ResponseMetadata> responseMetadata)
      Initializes the optional value responseMetadata to responseMetadata.
      Parameters:
      responseMetadata - The value for responseMetadata
      Returns:
      this builder for use in a chained invocation
    • setError

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

      public final SlackErrorResponse.Builder setError(Optional<? extends SlackError> error)
      Initializes the optional value error to error.
      Parameters:
      error - The value for error
      Returns:
      this builder for use in a chained invocation
    • addErrors

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

      public final SlackErrorResponse.Builder addErrors(SlackError... 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 SlackErrorResponse.Builder setErrors(Iterable<? extends SlackError> 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 SlackErrorResponse.Builder addAllErrors(Iterable<? extends SlackError> elements)
      Adds elements to errors list.
      Parameters:
      elements - An iterable of errors elements
      Returns:
      this builder for use in a chained invocation
    • build

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