Interface InvalidOperationError
- All Superinterfaces:
ErrorObject
Returned when the resources involved in the request are not in a valid state for the operation.
The client application should validate the constraints described in the error message before sending the request.
Example to create an instance using the builder pattern
InvalidOperationError invalidOperationError = InvalidOperationError.builder()
.message("{message}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for InvalidOperationError -
Method Summary
Modifier and TypeMethodDescriptionstatic InvalidOperationErrorBuilder
builder()
builder factory method for InvalidOperationErrorstatic InvalidOperationErrorBuilder
builder
(InvalidOperationError template) create builder for InvalidOperationError instancestatic InvalidOperationError
deepCopy
(InvalidOperationError template) factory method to create a deep copy of InvalidOperationError@NotNull String
getCode()
Error identifier.@NotNull String
Plain text description of the error.static InvalidOperationError
of()
factory methodstatic InvalidOperationError
of
(InvalidOperationError template) factory method to create a shallow copy InvalidOperationErrorvoid
setMessage
(String message) Plain text description of the error.static com.fasterxml.jackson.core.type.TypeReference<InvalidOperationError>
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
-
INVALID_OPERATION
discriminator value for InvalidOperationError- 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.
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
setMessage
Plain text description of the error.
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
of
factory method- Returns:
- instance of InvalidOperationError
-
of
factory method to create a shallow copy InvalidOperationError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of InvalidOperationError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InvalidOperationError- Returns:
- builder
-
builder
create builder for InvalidOperationError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withInvalidOperationError
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
-