Class GeneralErrorBuilder
java.lang.Object
com.commercetools.api.models.error.GeneralErrorBuilder
- All Implemented Interfaces:
Builder<GeneralError>
GeneralErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
GeneralError generalError = GeneralError.builder()
.message("{message}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.build()
builds GeneralError with checking for non-null required valuesbuilds GeneralError without checking for non-null required valuesDescription about any known details of the problem, for example,"Write operations are temporarily unavailable"
.Error-specific additional fields.Description about any known details of the problem, for example,"Write operations are temporarily unavailable"
.static GeneralErrorBuilder
of()
factory method for an instance of GeneralErrorBuilderstatic GeneralErrorBuilder
of
(GeneralError template) create builder for GeneralError instanceError-specific additional fields.
-
Constructor Details
-
GeneralErrorBuilder
public GeneralErrorBuilder()
-
-
Method Details
-
message
Description about any known details of the problem, for example,
"Write operations are temporarily unavailable"
.- Parameters:
message
- value to be set- Returns:
- Builder
-
values
Error-specific additional fields.
- Parameters:
values
- properties to be set- Returns:
- Builder
-
addValue
Error-specific additional fields.
- Parameters:
key
- property namevalue
- property value- Returns:
- Builder
-
getMessage
Description about any known details of the problem, for example,
"Write operations are temporarily unavailable"
.- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
build
builds GeneralError with checking for non-null required values- Specified by:
build
in interfaceBuilder<GeneralError>
- Returns:
- GeneralError
-
buildUnchecked
builds GeneralError without checking for non-null required values- Returns:
- GeneralError
-
of
factory method for an instance of GeneralErrorBuilder- Returns:
- builder
-
of
create builder for GeneralError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-