Interface DuplicateVariantValuesError
- All Superinterfaces:
ErrorObject
- All Known Implementing Classes:
DuplicateVariantValuesErrorImpl
Returned when a Product Variant value conflicts with an existing one during an Update Product request.
Example to create an instance using the builder pattern
DuplicateVariantValuesError duplicateVariantValuesError = DuplicateVariantValuesError.builder()
.message("{message}")
.variantValues(variantValuesBuilder -> variantValuesBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for DuplicateVariantValuesError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for DuplicateVariantValuesErrorbuilder
(DuplicateVariantValuesError template) create builder for DuplicateVariantValuesError instancestatic DuplicateVariantValuesError
deepCopy
(DuplicateVariantValuesError template) factory method to create a deep copy of DuplicateVariantValuesError@NotNull String
getCode()
Error identifier.@NotNull String
"A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."
@NotNull @Valid VariantValues
Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.static DuplicateVariantValuesError
of()
factory methodstatic DuplicateVariantValuesError
of
(DuplicateVariantValuesError template) factory method to create a shallow copy DuplicateVariantValuesErrorvoid
setMessage
(String message) "A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."
void
setVariantValues
(VariantValues variantValues) Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.static com.fasterxml.jackson.core.type.TypeReference<DuplicateVariantValuesError>
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_VARIANT_VALUES
discriminator value for DuplicateVariantValuesError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getVariantValues
Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.
- Returns:
- variantValues
-
setMessage
"A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setVariantValues
Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.
- Parameters:
variantValues
- value to be set
-
of
factory method- Returns:
- instance of DuplicateVariantValuesError
-
of
factory method to create a shallow copy DuplicateVariantValuesError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static DuplicateVariantValuesError deepCopy(@Nullable DuplicateVariantValuesError template) factory method to create a deep copy of DuplicateVariantValuesError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DuplicateVariantValuesError- Returns:
- builder
-
builder
create builder for DuplicateVariantValuesError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDuplicateVariantValuesError
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
-