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
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SemanticErrorErrorBuilderbuilder()builder factory method for SemanticErrorErrorstatic SemanticErrorErrorBuilderbuilder(SemanticErrorError template) create builder for SemanticErrorError instancecopyDeep()static SemanticErrorErrordeepCopy(SemanticErrorError template) factory method to create a deep copy of SemanticErrorError@NotNull StringgetCode()Error identifier.@NotNull StringPlain text description of the error concerning the predicate.static SemanticErrorErrorof()factory methodstatic SemanticErrorErrorof(SemanticErrorError template) factory method to create a shallow copy SemanticErrorErrorvoidsetMessage(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> TwithSemanticErrorError(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:ErrorObjectError identifier.
- Specified by:
getCodein 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:
getMessagein 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:
setMessagein 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
-
copyDeep
SemanticErrorError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
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
-