Interface EnumValueIsUsedError
- All Superinterfaces:
ErrorObject
Returned when an enum value cannot be removed from an Attribute as it is being used by a Product.
The error is returned as a failed response to the Remove EnumValues from AttributeDefinition update action.
Example to create an instance using the builder pattern
EnumValueIsUsedError enumValueIsUsedError = EnumValueIsUsedError.builder()
.message("{message}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for EnumValueIsUsedError -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumValueIsUsedErrorBuilder
builder()
builder factory method for EnumValueIsUsedErrorstatic EnumValueIsUsedErrorBuilder
builder
(EnumValueIsUsedError template) create builder for EnumValueIsUsedError instancestatic EnumValueIsUsedError
deepCopy
(EnumValueIsUsedError template) factory method to create a deep copy of EnumValueIsUsedError@NotNull String
getCode()
Error identifier.@NotNull String
"$enumKeysTranscript is used by some products and cannot be deleted because the $attributeName attribute is required."
static EnumValueIsUsedError
of()
factory methodstatic EnumValueIsUsedError
of
(EnumValueIsUsedError template) factory method to create a shallow copy EnumValueIsUsedErrorvoid
setMessage
(String message) "$enumKeysTranscript is used by some products and cannot be deleted because the $attributeName attribute is required."
static com.fasterxml.jackson.core.type.TypeReference<EnumValueIsUsedError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withEnumValueIsUsedError
(Function<EnumValueIsUsedError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
ENUM_VALUE_IS_USED
discriminator value for EnumValueIsUsedError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"$enumKeysTranscript is used by some products and cannot be deleted because the $attributeName attribute is required."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
setMessage
"$enumKeysTranscript is used by some products and cannot be deleted because the $attributeName attribute is required."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
of
factory method- Returns:
- instance of EnumValueIsUsedError
-
of
factory method to create a shallow copy EnumValueIsUsedError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of EnumValueIsUsedError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for EnumValueIsUsedError- Returns:
- builder
-
builder
create builder for EnumValueIsUsedError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withEnumValueIsUsedError
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
-