Interface ErrorResponse
public interface ErrorResponse
ErrorResponse
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ErrorResponse errorResponse = ErrorResponse.builder()
.statusCode(1)
.message("{message}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorResponseBuilder
builder()
builder factory method for ErrorResponsestatic ErrorResponseBuilder
builder
(ErrorResponse template) create builder for ErrorResponse instancestatic ErrorResponse
deepCopy
(ErrorResponse template) factory method to create a deep copy of ErrorResponsegetError()
@Valid List<ErrorObject>
@NotNull String
@NotNull Integer
static ErrorResponse
of()
factory methodstatic ErrorResponse
of
(ErrorResponse template) factory method to create a shallow copy ErrorResponsevoid
set errorvoid
setErrorDescription
(String errorDescription) set error_descriptionvoid
setErrors
(ErrorObject... errors) set errorsvoid
setErrors
(List<ErrorObject> errors) set errorsvoid
setMessage
(String message) set messagevoid
setStatusCode
(Integer statusCode) set statusCodestatic com.fasterxml.jackson.core.type.TypeReference<ErrorResponse>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withErrorResponse
(Function<ErrorResponse, T> helper) accessor map function
-
Method Details
-
getStatusCode
- Returns:
- statusCode
-
getMessage
- Returns:
- message
-
getError
String getError()- Returns:
- error
-
getErrorDescription
String getErrorDescription()- Returns:
- error_description
-
getErrors
- Returns:
- errors
-
setStatusCode
set statusCode- Parameters:
statusCode
- value to be set
-
setMessage
set message- Parameters:
message
- value to be set
-
setError
set error- Parameters:
error
- value to be set
-
setErrorDescription
set error_description- Parameters:
errorDescription
- value to be set
-
setErrors
set errors- Parameters:
errors
- values to be set
-
setErrors
set errors- Parameters:
errors
- values to be set
-
of
factory method- Returns:
- instance of ErrorResponse
-
of
factory method to create a shallow copy ErrorResponse- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ErrorResponse- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ErrorResponse- Returns:
- builder
-
builder
create builder for ErrorResponse instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withErrorResponse
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-