Class ErrorResponseImpl

java.lang.Object
com.commercetools.api.models.error.ErrorResponseImpl
All Implemented Interfaces:
ErrorResponse, io.vrap.rmf.base.client.ModelBase

public class ErrorResponseImpl extends Object implements ErrorResponse, io.vrap.rmf.base.client.ModelBase

Base representation of an error response containing common fields to all errors.

  • Constructor Details

    • ErrorResponseImpl

      public ErrorResponseImpl()
      create empty instance
  • Method Details

    • getStatusCode

      public Integer getStatusCode()

      HTTP status code corresponding to the error.

      Specified by:
      getStatusCode in interface ErrorResponse
      Returns:
      statusCode
    • getMessage

      public String getMessage()

      First error message in the errors array.

      Specified by:
      getMessage in interface ErrorResponse
      Returns:
      message
    • getErrors

      public List<ErrorObject> getErrors()

      Errors returned for a request.

      A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

      Specified by:
      getErrors in interface ErrorResponse
      Returns:
      errors
    • setStatusCode

      public void setStatusCode(Integer statusCode)
      Description copied from interface: ErrorResponse

      HTTP status code corresponding to the error.

      Specified by:
      setStatusCode in interface ErrorResponse
      Parameters:
      statusCode - value to be set
    • setMessage

      public void setMessage(String message)
      Description copied from interface: ErrorResponse

      First error message in the errors array.

      Specified by:
      setMessage in interface ErrorResponse
      Parameters:
      message - value to be set
    • setErrors

      public void setErrors(ErrorObject... errors)
      Description copied from interface: ErrorResponse

      Errors returned for a request.

      A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

      Specified by:
      setErrors in interface ErrorResponse
      Parameters:
      errors - values to be set
    • setErrors

      public void setErrors(List<ErrorObject> errors)
      Description copied from interface: ErrorResponse

      Errors returned for a request.

      A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

      Specified by:
      setErrors in interface ErrorResponse
      Parameters:
      errors - values to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • copyDeep

      public ErrorResponse copyDeep()
      Specified by:
      copyDeep in interface ErrorResponse