Interface DuplicateAttributeValuesError
- All Superinterfaces:
ErrorObject
Returned when the CombinationUnique
AttributeConstraint criteria are not met during an Update Product request.
Example to create an instance using the builder pattern
DuplicateAttributeValuesError duplicateAttributeValuesError = DuplicateAttributeValuesError.builder()
.message("{message}")
.plusAttributes(attributesBuilder -> attributesBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for DuplicateAttributeValuesError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for DuplicateAttributeValuesErrorbuilder
(DuplicateAttributeValuesError template) create builder for DuplicateAttributeValuesError instancedeepCopy
(DuplicateAttributeValuesError template) factory method to create a deep copy of DuplicateAttributeValuesErrorConflicting Attributes.@NotNull String
getCode()
Error identifier.@NotNull String
"The set of attributes must be unique across all variants."
of()
factory methodof
(DuplicateAttributeValuesError template) factory method to create a shallow copy DuplicateAttributeValuesErrorvoid
setAttributes
(Attribute... attributes) Conflicting Attributes.void
setAttributes
(List<Attribute> attributes) Conflicting Attributes.void
setMessage
(String message) "The set of attributes must be unique across all variants."
static com.fasterxml.jackson.core.type.TypeReference<DuplicateAttributeValuesError>
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_ATTRIBUTE_VALUES
discriminator value for DuplicateAttributeValuesError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"The set of attributes must be unique across all variants."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getAttributes
Conflicting Attributes.
- Returns:
- attributes
-
setMessage
"The set of attributes must be unique across all variants."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setAttributes
Conflicting Attributes.
- Parameters:
attributes
- values to be set
-
setAttributes
Conflicting Attributes.
- Parameters:
attributes
- values to be set
-
of
factory method- Returns:
- instance of DuplicateAttributeValuesError
-
of
factory method to create a shallow copy DuplicateAttributeValuesError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static DuplicateAttributeValuesError deepCopy(@Nullable DuplicateAttributeValuesError template) factory method to create a deep copy of DuplicateAttributeValuesError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DuplicateAttributeValuesError- Returns:
- builder
-
builder
create builder for DuplicateAttributeValuesError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDuplicateAttributeValuesError
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
-