Class DuplicateVariantValuesErrorBuilder
java.lang.Object
com.commercetools.api.models.error.DuplicateVariantValuesErrorBuilder
- All Implemented Interfaces:
Builder<DuplicateVariantValuesError>
public class DuplicateVariantValuesErrorBuilder
extends Object
implements Builder<DuplicateVariantValuesError>
DuplicateVariantValuesErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DuplicateVariantValuesError duplicateVariantValuesError = DuplicateVariantValuesError.builder()
.message("{message}")
.variantValues(variantValuesBuilder -> variantValuesBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.build()
builds DuplicateVariantValuesError with checking for non-null required valuesbuilds DuplicateVariantValuesError without checking for non-null required values"A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."
Error-specific additional fields.Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values."A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."
of()
factory method for an instance of DuplicateVariantValuesErrorBuilderof
(DuplicateVariantValuesError template) create builder for DuplicateVariantValuesError instanceError-specific additional fields.variantValues
(VariantValues variantValues) Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.
-
Constructor Details
-
DuplicateVariantValuesErrorBuilder
public DuplicateVariantValuesErrorBuilder()
-
-
Method Details
-
message
"A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."
- Parameters:
message
- value to be set- Returns:
- Builder
-
values
Error-specific additional fields.
- Parameters:
values
- properties to be set- Returns:
- Builder
-
addValue
Error-specific additional fields.
- Parameters:
key
- property namevalue
- property value- Returns:
- Builder
-
variantValues
public DuplicateVariantValuesErrorBuilder variantValues(Function<VariantValuesBuilder, VariantValuesBuilder> builder) Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.
- Parameters:
builder
- function to build the variantValues value- Returns:
- Builder
-
withVariantValues
public DuplicateVariantValuesErrorBuilder withVariantValues(Function<VariantValuesBuilder, VariantValues> builder) Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.
- Parameters:
builder
- function to build the variantValues value- Returns:
- Builder
-
variantValues
Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.
- Parameters:
variantValues
- value to be set- Returns:
- Builder
-
getMessage
"A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."
- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
getVariantValues
Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.
- Returns:
- variantValues
-
build
builds DuplicateVariantValuesError with checking for non-null required values- Specified by:
build
in interfaceBuilder<DuplicateVariantValuesError>
- Returns:
- DuplicateVariantValuesError
-
buildUnchecked
builds DuplicateVariantValuesError without checking for non-null required values- Returns:
- DuplicateVariantValuesError
-
of
factory method for an instance of DuplicateVariantValuesErrorBuilder- Returns:
- builder
-
of
create builder for DuplicateVariantValuesError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-