Class ImmutableNessieError.Builder

  • Enclosing class:
    ImmutableNessieError

    @NotThreadSafe
    public static final class ImmutableNessieError.Builder
    extends Object
    Builds instances of type ImmutableNessieError. 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 Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableNessieError.Builder from​(NessieError instance)
        Fill a builder with attribute values from the provided NessieError instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • status

        @CanIgnoreReturnValue
        public final ImmutableNessieError.Builder status​(int status)
        Initializes the value for the status attribute.
        Parameters:
        status - The value for status
        Returns:
        this builder for use in a chained invocation
      • reason

        @CanIgnoreReturnValue
        public final ImmutableNessieError.Builder reason​(String reason)
        Initializes the value for the reason attribute.
        Parameters:
        reason - The value for reason
        Returns:
        this builder for use in a chained invocation
      • message

        @CanIgnoreReturnValue
        public final ImmutableNessieError.Builder message​(String message)
        Initializes the value for the message attribute.

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

        Parameters:
        message - The value for message
        Returns:
        this builder for use in a chained invocation
      • errorCode

        @CanIgnoreReturnValue
        public final ImmutableNessieError.Builder errorCode​(ErrorCode errorCode)
        Initializes the value for the errorCode attribute.

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

        Parameters:
        errorCode - The value for errorCode
        Returns:
        this builder for use in a chained invocation
      • serverStackTrace

        @CanIgnoreReturnValue
        public final ImmutableNessieError.Builder serverStackTrace​(@Nullable
                                                                   String serverStackTrace)
        Initializes the value for the serverStackTrace attribute.
        Parameters:
        serverStackTrace - The value for serverStackTrace (can be null)
        Returns:
        this builder for use in a chained invocation
      • clientProcessingException

        @CanIgnoreReturnValue
        public final ImmutableNessieError.Builder clientProcessingException​(@Nullable
                                                                            Exception clientProcessingException)
        Initializes the value for the clientProcessingException attribute.
        Parameters:
        clientProcessingException - The value for clientProcessingException (can be null)
        Returns:
        this builder for use in a chained invocation