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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Errors returned for a request.First error message in theerrors
array.HTTP status code corresponding to the error.int
hashCode()
void
setErrors
(ErrorObject... errors) Errors returned for a request.void
setErrors
(List<ErrorObject> errors) Errors returned for a request.void
setMessage
(String message) First error message in theerrors
array.void
setStatusCode
(Integer statusCode) HTTP status code corresponding to the error.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.error.ErrorResponse
withErrorResponse
Methods 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:
getStatusCode
in interfaceErrorResponse
- Returns:
- statusCode
-
getMessage
First error message in the
errors
array.- Specified by:
getMessage
in 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:
getErrors
in interfaceErrorResponse
- Returns:
- errors
-
setStatusCode
Description copied from interface:ErrorResponse
HTTP status code corresponding to the error.
- Specified by:
setStatusCode
in interfaceErrorResponse
- Parameters:
statusCode
- value to be set
-
setMessage
Description copied from interface:ErrorResponse
First error message in the
errors
array.- Specified by:
setMessage
in interfaceErrorResponse
- Parameters:
message
- value to be set
-
setErrors
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 interfaceErrorResponse
- Parameters:
errors
- values to be set
-
setErrors
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 interfaceErrorResponse
- Parameters:
errors
- values to be set
-
equals
-
hashCode
-