Interface InternalConstraintViolatedError
- All Superinterfaces:
ErrorObject
Returned when certain API-specific constraints were not met. For example, the specified Discount Code was never applied and cannot be updated.
Example to create an instance using the builder pattern
InternalConstraintViolatedError internalConstraintViolatedError = InternalConstraintViolatedError.builder()
.message("{message}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for InternalConstraintViolatedError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for InternalConstraintViolatedErrorbuilder(InternalConstraintViolatedError template) create builder for InternalConstraintViolatedError instancecopyDeep()deepCopy(InternalConstraintViolatedError template) factory method to create a deep copy of InternalConstraintViolatedError@NotNull StringgetCode()Error identifier.@NotNull StringPlain text description of the constraints that were violated.of()factory methodof(InternalConstraintViolatedError template) factory method to create a shallow copy InternalConstraintViolatedErrorvoidsetMessage(String message) Plain text description of the constraints that were violated.static com.fasterxml.jackson.core.type.TypeReference<InternalConstraintViolatedError>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
INTERNAL_CONSTRAINT_VIOLATED
discriminator value for InternalConstraintViolatedError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
Plain text description of the constraints that were violated.
- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
setMessage
Plain text description of the constraints that were violated.
- Specified by:
setMessagein interfaceErrorObject- Parameters:
message- value to be set
-
of
factory method- Returns:
- instance of InternalConstraintViolatedError
-
of
factory method to create a shallow copy InternalConstraintViolatedError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
InternalConstraintViolatedError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
deepCopy
@Nullable static InternalConstraintViolatedError deepCopy(@Nullable InternalConstraintViolatedError template) factory method to create a deep copy of InternalConstraintViolatedError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InternalConstraintViolatedError- Returns:
- builder
-
builder
create builder for InternalConstraintViolatedError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withInternalConstraintViolatedError
default <T> T withInternalConstraintViolatedError(Function<InternalConstraintViolatedError, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<InternalConstraintViolatedError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-