Class SemanticErrorErrorBuilder
java.lang.Object
com.commercetools.api.models.error.SemanticErrorErrorBuilder
- All Implemented Interfaces:
Builder<SemanticErrorError>
SemanticErrorErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
SemanticErrorError semanticErrorError = SemanticErrorError.builder()
.message("{message}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.build()
builds SemanticErrorError with checking for non-null required valuesbuilds SemanticErrorError without checking for non-null required valuesPlain text description of the error concerning the predicate.Error-specific additional fields.Plain text description of the error concerning the predicate.static SemanticErrorErrorBuilder
of()
factory method for an instance of SemanticErrorErrorBuilderstatic SemanticErrorErrorBuilder
of
(SemanticErrorError template) create builder for SemanticErrorError instanceError-specific additional fields.
-
Constructor Details
-
SemanticErrorErrorBuilder
public SemanticErrorErrorBuilder()
-
-
Method Details
-
message
Plain text description of the error concerning the predicate. For example,
"Invalid country code $countryCode provided for the field $fieldDefinition."
.- 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
Plain text description of the error concerning the predicate. For example,
"Invalid country code $countryCode provided for the field $fieldDefinition."
.- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
build
builds SemanticErrorError with checking for non-null required values- Specified by:
build
in interfaceBuilder<SemanticErrorError>
- Returns:
- SemanticErrorError
-
buildUnchecked
builds SemanticErrorError without checking for non-null required values- Returns:
- SemanticErrorError
-
of
factory method for an instance of SemanticErrorErrorBuilder- Returns:
- builder
-
of
create builder for SemanticErrorError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-