Class ProductSearchErrorResponseBuilder
java.lang.Object
com.commercetools.api.models.product_search.ProductSearchErrorResponseBuilder
- All Implemented Interfaces:
Builder<ProductSearchErrorResponse>
public class ProductSearchErrorResponseBuilder
extends Object
implements Builder<ProductSearchErrorResponse>
ProductSearchErrorResponseBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductSearchErrorResponse productSearchErrorResponse = ProductSearchErrorResponse.builder()
.statusCode(1)
.message("{message}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductSearchErrorResponse with checking for non-null required valuesbuilds ProductSearchErrorResponse without checking for non-null required valueserrors
(ErrorObject... errors) The errors that caused this error response.errors
(List<ErrorObject> errors) The errors that caused this error response.The errors that caused this error response.Describes the error.The HTTP status code of the response.Describes the error.of()
factory method for an instance of ProductSearchErrorResponseBuilderof
(ProductSearchErrorResponse template) create builder for ProductSearchErrorResponse instanceplusErrors
(ErrorObject... errors) The errors that caused this error response.plusErrors
(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) The errors that caused this error response.statusCode
(Integer statusCode) The HTTP status code of the response.withErrors
(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) The errors that caused this error response.
-
Constructor Details
-
ProductSearchErrorResponseBuilder
public ProductSearchErrorResponseBuilder()
-
-
Method Details
-
statusCode
The HTTP status code of the response.
- Parameters:
statusCode
- value to be set- Returns:
- Builder
-
message
Describes the error.
- Parameters:
message
- value to be set- Returns:
- Builder
-
errors
The errors that caused this error response.
- Parameters:
errors
- value to be set- Returns:
- Builder
-
errors
The errors that caused this error response.
- Parameters:
errors
- value to be set- Returns:
- Builder
-
plusErrors
The errors that caused this error response.
- Parameters:
errors
- value to be set- Returns:
- Builder
-
plusErrors
public ProductSearchErrorResponseBuilder plusErrors(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) The errors that caused this error response.
- Parameters:
builder
- function to build the errors value- Returns:
- Builder
-
withErrors
public ProductSearchErrorResponseBuilder withErrors(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) The errors that caused this error response.
- Parameters:
builder
- function to build the errors value- Returns:
- Builder
-
getStatusCode
The HTTP status code of the response.
- Returns:
- statusCode
-
getMessage
Describes the error.
- Returns:
- message
-
getErrors
The errors that caused this error response.
- Returns:
- errors
-
build
builds ProductSearchErrorResponse with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSearchErrorResponse>
- Returns:
- ProductSearchErrorResponse
-
buildUnchecked
builds ProductSearchErrorResponse without checking for non-null required values- Returns:
- ProductSearchErrorResponse
-
of
factory method for an instance of ProductSearchErrorResponseBuilder- Returns:
- builder
-
of
create builder for ProductSearchErrorResponse instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-