Class ErrorResponseBuilder
java.lang.Object
com.commercetools.history.models.change_history.ErrorResponseBuilder
- All Implemented Interfaces:
Builder<ErrorResponse>
ErrorResponseBuilder
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()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddErrors
(Function<ErrorObjectBuilder, ErrorObject> builder) add the value to the errors using the builder functionbuild()
builds ErrorResponse with checking for non-null required valuesbuilds ErrorResponse without checking for non-null required valuesset the value to the errorerror_description
(String error_description) set the value to the error_descriptionerrors
(ErrorObject... errors) set values to the errorserrors
(List<ErrorObject> errors) set value to the errorsgetError()
value of error}value of error_description}value of errors}value of message}value of statusCode}set the value to the messagestatic ErrorResponseBuilder
of()
factory method for an instance of ErrorResponseBuilderstatic ErrorResponseBuilder
of
(ErrorResponse template) create builder for ErrorResponse instanceplusErrors
(ErrorObject... errors) add values to the errorsadd the value to the errors using the builder functionsetErrors
(Function<ErrorObjectBuilder, ErrorObject> builder) set the value to the errors using the builder functionstatusCode
(Integer statusCode) set the value to the statusCodeset the value to the errors using the builder function
-
Constructor Details
-
ErrorResponseBuilder
public ErrorResponseBuilder()
-
-
Method Details
-
statusCode
set the value to the statusCode- Parameters:
statusCode
- value to be set- Returns:
- Builder
-
message
set the value to the message- Parameters:
message
- value to be set- Returns:
- Builder
-
error
set the value to the error- Parameters:
error
- value to be set- Returns:
- Builder
-
error_description
set the value to the error_description- Parameters:
error_description
- value to be set- Returns:
- Builder
-
errors
set values to the errors- Parameters:
errors
- value to be set- Returns:
- Builder
-
errors
set value to the errors- Parameters:
errors
- value to be set- Returns:
- Builder
-
plusErrors
add values to the errors- Parameters:
errors
- value to be set- Returns:
- Builder
-
plusErrors
add the value to the errors using the builder function- Parameters:
builder
- function to build the errors value- Returns:
- Builder
-
withErrors
set the value to the errors using the builder function- Parameters:
builder
- function to build the errors value- Returns:
- Builder
-
addErrors
add the value to the errors using the builder function- Parameters:
builder
- function to build the errors value- Returns:
- Builder
-
setErrors
set the value to the errors using the builder function- Parameters:
builder
- function to build the errors value- Returns:
- Builder
-
getStatusCode
value of statusCode}- Returns:
- statusCode
-
getMessage
value of message}- Returns:
- message
-
getError
value of error}- Returns:
- error
-
getError_description
value of error_description}- Returns:
- error_description
-
getErrors
value of errors}- Returns:
- errors
-
build
builds ErrorResponse with checking for non-null required values- Specified by:
build
in interfaceBuilder<ErrorResponse>
- Returns:
- ErrorResponse
-
buildUnchecked
builds ErrorResponse without checking for non-null required values- Returns:
- ErrorResponse
-
of
factory method for an instance of ErrorResponseBuilder- Returns:
- builder
-
of
create builder for ErrorResponse instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-