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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopyDeep()booleanErrors returned for a request.First error message in theerrorsarray.HTTP status code corresponding to the error.inthashCode()voidsetErrors(ErrorObject... errors) Errors returned for a request.voidsetErrors(List<ErrorObject> errors) Errors returned for a request.voidsetMessage(String message) First error message in theerrorsarray.voidsetStatusCode(Integer statusCode) HTTP status code corresponding to the error.toString()Methods inherited from interface com.commercetools.api.models.error.ErrorResponse
withErrorResponseMethods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
ErrorResponseImpl
public ErrorResponseImpl()create empty instance
-
-
Method Details
-
getStatusCode
HTTP status code corresponding to the error.
- Specified by:
getStatusCodein interfaceErrorResponse- Returns:
- statusCode
-
getMessage
First error message in the
errorsarray.- Specified by:
getMessagein interfaceErrorResponse- Returns:
- message
-
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:
getErrorsin interfaceErrorResponse- Returns:
- errors
-
setStatusCode
Description copied from interface:ErrorResponseHTTP status code corresponding to the error.
- Specified by:
setStatusCodein interfaceErrorResponse- Parameters:
statusCode- value to be set
-
setMessage
Description copied from interface:ErrorResponseFirst error message in the
errorsarray.- Specified by:
setMessagein interfaceErrorResponse- Parameters:
message- value to be set
-
setErrors
Description copied from interface:ErrorResponseErrors 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:
setErrorsin interfaceErrorResponse- Parameters:
errors- values to be set
-
setErrors
Description copied from interface:ErrorResponseErrors 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:
setErrorsin interfaceErrorResponse- Parameters:
errors- values to be set
-
equals
-
hashCode
public int hashCode() -
toString
-
copyDeep
- Specified by:
copyDeepin interfaceErrorResponse
-