Interface EnumKeyDoesNotExistError
- All Superinterfaces:
ErrorObject
Returned when an AttributeEnumType or AttributeLocalizedEnumType already contains a value with the given key.
The error is returned as a failed response to the Change the key of an EnumValue update action.
Example to create an instance using the builder pattern
EnumKeyDoesNotExistError enumKeyDoesNotExistError = EnumKeyDoesNotExistError.builder()
.message("{message}")
.conflictingEnumKey("{conflictingEnumKey}")
.conflictingAttributeName("{conflictingAttributeName}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for EnumKeyDoesNotExistError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for EnumKeyDoesNotExistErrorbuilder
(EnumKeyDoesNotExistError template) create builder for EnumKeyDoesNotExistError instancestatic EnumKeyDoesNotExistError
deepCopy
(EnumKeyDoesNotExistError template) factory method to create a deep copy of EnumKeyDoesNotExistError@NotNull String
getCode()
Error identifier.@NotNull String
Name of the conflicting Attribute.@NotNull String
Conflicting enum key.@NotNull String
"The $fieldName field definition does not contain an enum value with the key $enumKey."
static EnumKeyDoesNotExistError
of()
factory methodstatic EnumKeyDoesNotExistError
of
(EnumKeyDoesNotExistError template) factory method to create a shallow copy EnumKeyDoesNotExistErrorvoid
setConflictingAttributeName
(String conflictingAttributeName) Name of the conflicting Attribute.void
setConflictingEnumKey
(String conflictingEnumKey) Conflicting enum key.void
setMessage
(String message) "The $fieldName field definition does not contain an enum value with the key $enumKey."
static com.fasterxml.jackson.core.type.TypeReference<EnumKeyDoesNotExistError>
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
-
ENUM_KEY_DOES_NOT_EXIST
discriminator value for EnumKeyDoesNotExistError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"The $fieldName field definition does not contain an enum value with the key $enumKey."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getConflictingEnumKey
Conflicting enum key.
- Returns:
- conflictingEnumKey
-
getConflictingAttributeName
Name of the conflicting Attribute.
- Returns:
- conflictingAttributeName
-
setMessage
"The $fieldName field definition does not contain an enum value with the key $enumKey."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setConflictingEnumKey
Conflicting enum key.
- Parameters:
conflictingEnumKey
- value to be set
-
setConflictingAttributeName
Name of the conflicting Attribute.
- Parameters:
conflictingAttributeName
- value to be set
-
of
factory method- Returns:
- instance of EnumKeyDoesNotExistError
-
of
factory method to create a shallow copy EnumKeyDoesNotExistError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of EnumKeyDoesNotExistError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for EnumKeyDoesNotExistError- Returns:
- builder
-
builder
create builder for EnumKeyDoesNotExistError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withEnumKeyDoesNotExistError
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
-