Interface DuplicateVariantValuesError
- All Superinterfaces:
ErrorObject
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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for DuplicateVariantValuesError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for DuplicateVariantValuesErrorbuilder(DuplicateVariantValuesError template) create builder for DuplicateVariantValuesError instancecopyDeep()static DuplicateVariantValuesErrordeepCopy(DuplicateVariantValuesError template) factory method to create a deep copy of DuplicateVariantValuesError@NotNull StringgetCode()Error identifier.@NotNull String"A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."@NotNull @Valid VariantValuesEvery Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.static DuplicateVariantValuesErrorof()factory methodstatic DuplicateVariantValuesErrorof(DuplicateVariantValuesError template) factory method to create a shallow copy DuplicateVariantValuesErrorvoidsetMessage(String message) "A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."voidsetVariantValues(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> Taccessor 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:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."- Specified by:
getMessagein 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:
setMessagein 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
-
copyDeep
DuplicateVariantValuesError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
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
-