Interface SemanticErrorError
- All Superinterfaces:
ErrorObject
Returned when a Discount predicate or API Extension predicate is not semantically correct.
Example to create an instance using the builder pattern
SemanticErrorError semanticErrorError = SemanticErrorError.builder()
.message("{message}")
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SemanticErrorErrorBuilder
builder()
builder factory method for SemanticErrorErrorstatic SemanticErrorErrorBuilder
builder
(SemanticErrorError template) create builder for SemanticErrorError instancestatic SemanticErrorError
deepCopy
(SemanticErrorError template) factory method to create a deep copy of SemanticErrorError@NotNull String
getCode()
Error identifier.@NotNull String
Plain text description of the error concerning the predicate.static SemanticErrorError
of()
factory methodstatic SemanticErrorError
of
(SemanticErrorError template) factory method to create a shallow copy SemanticErrorErrorvoid
setMessage
(String message) Plain text description of the error concerning the predicate.static com.fasterxml.jackson.core.type.TypeReference<SemanticErrorError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withSemanticErrorError
(Function<SemanticErrorError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
SEMANTIC_ERROR
discriminator value for SemanticErrorError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
Plain text description of the error concerning the predicate. For example,
"Invalid country code $countryCode provided for the field $fieldDefinition."
.- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
setMessage
Plain text description of the error concerning the predicate. For example,
"Invalid country code $countryCode provided for the field $fieldDefinition."
.- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
of
factory method- Returns:
- instance of SemanticErrorError
-
of
factory method to create a shallow copy SemanticErrorError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of SemanticErrorError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for SemanticErrorError- Returns:
- builder
-
builder
create builder for SemanticErrorError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withSemanticErrorError
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
-