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
Modifier and TypeFieldDescriptionstatic final String
discriminator value for InternalConstraintViolatedError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for InternalConstraintViolatedErrorbuilder
(InternalConstraintViolatedError template) create builder for InternalConstraintViolatedError instancedeepCopy
(InternalConstraintViolatedError template) factory method to create a deep copy of InternalConstraintViolatedError@NotNull String
getCode()
Error identifier.@NotNull String
Plain text description of the constraints that were violated.of()
factory methodof
(InternalConstraintViolatedError template) factory method to create a shallow copy InternalConstraintViolatedErrorvoid
setMessage
(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> T
accessor 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:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
Plain text description of the constraints that were violated.
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
setMessage
Plain text description of the constraints that were violated.
- Specified by:
setMessage
in 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
-
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
-