Class ImmutableNessieError

    • Method Detail

      • getStatus

        public int getStatus()
        HTTP status code of this error.
        Specified by:
        getStatus in interface NessieError
      • getReason

        public String getReason()
        Reason phrase for the HTTP status code.
        Specified by:
        getReason in interface NessieError
      • withStatus

        public final ImmutableNessieError withStatus​(int value)
        Copy the current immutable object by setting a value for the status attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for status
        Returns:
        A modified copy of the this object
      • withReason

        public final ImmutableNessieError withReason​(String value)
        Copy the current immutable object by setting a value for the reason attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for reason
        Returns:
        A modified copy of the this object
      • withMessage

        public final ImmutableNessieError withMessage​(String value)
        Copy the current immutable object by setting a value for the message attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for message
        Returns:
        A modified copy of the this object
      • withErrorCode

        public final ImmutableNessieError withErrorCode​(ErrorCode value)
        Copy the current immutable object by setting a value for the errorCode attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for errorCode
        Returns:
        A modified copy of the this object
      • withServerStackTrace

        public final ImmutableNessieError withServerStackTrace​(@Nullable
                                                               String value)
        Copy the current immutable object by setting a value for the serverStackTrace attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for serverStackTrace (can be null)
        Returns:
        A modified copy of the this object
      • withClientProcessingException

        public final ImmutableNessieError withClientProcessingException​(@Nullable
                                                                        Exception value)
        Copy the current immutable object by setting a value for the clientProcessingException attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for clientProcessingException (can be null)
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableNessieError that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: status, reason, message, errorCode, serverStackTrace.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value NessieError with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableNessieError copyOf​(NessieError instance)
        Creates an immutable copy of a NessieError value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable NessieError instance