Interface DuplicateEnumValuesError
- All Superinterfaces:
ErrorObject
Returned when an AttributeEnumType or AttributeLocalizedEnumType contains duplicate keys.
Example to create an instance using the builder pattern
DuplicateEnumValuesError duplicateEnumValuesError = DuplicateEnumValuesError.builder()
.message("{message}")
.plusDuplicates(duplicatesBuilder -> duplicatesBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for DuplicateEnumValuesError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for DuplicateEnumValuesErrorbuilder
(DuplicateEnumValuesError template) create builder for DuplicateEnumValuesError instancestatic DuplicateEnumValuesError
deepCopy
(DuplicateEnumValuesError template) factory method to create a deep copy of DuplicateEnumValuesError@NotNull String
getCode()
Error identifier.Duplicate keys.@NotNull String
"The enum values contain duplicate keys: $listOfDuplicateKeys."
static DuplicateEnumValuesError
of()
factory methodstatic DuplicateEnumValuesError
of
(DuplicateEnumValuesError template) factory method to create a shallow copy DuplicateEnumValuesErrorvoid
setDuplicates
(String... duplicates) Duplicate keys.void
setDuplicates
(List<String> duplicates) Duplicate keys.void
setMessage
(String message) "The enum values contain duplicate keys: $listOfDuplicateKeys."
static com.fasterxml.jackson.core.type.TypeReference<DuplicateEnumValuesError>
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
-
DUPLICATE_ENUM_VALUES
discriminator value for DuplicateEnumValuesError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"The enum values contain duplicate keys: $listOfDuplicateKeys."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getDuplicates
Duplicate keys.
- Returns:
- duplicates
-
setMessage
"The enum values contain duplicate keys: $listOfDuplicateKeys."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setDuplicates
Duplicate keys.
- Parameters:
duplicates
- values to be set
-
setDuplicates
Duplicate keys.
- Parameters:
duplicates
- values to be set
-
of
factory method- Returns:
- instance of DuplicateEnumValuesError
-
of
factory method to create a shallow copy DuplicateEnumValuesError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of DuplicateEnumValuesError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DuplicateEnumValuesError- Returns:
- builder
-
builder
create builder for DuplicateEnumValuesError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDuplicateEnumValuesError
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
-