Interface ProductSelectionSetVariantSelectionAction
- All Superinterfaces:
ProductSelectionUpdateAction,ResourceUpdateAction<ProductSelectionUpdateAction>
Updates the Product Variant Selection of an existing Product Selection Assignment. A ProductVariantSelection can only be set if the Product has already been included in the Product Selection with Individual ProductSelectionMode.
If the specified Product is not assigned to the Product Selection, a ProductAssignmentMissing error is returned.
Example to create an instance using the builder pattern
ProductSelectionSetVariantSelectionAction productSelectionSetVariantSelectionAction = ProductSelectionSetVariantSelectionAction.builder()
.product(productBuilder -> productBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for ProductSelectionSetVariantSelectionAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ProductSelectionSetVariantSelectionActioncreate builder for ProductSelectionSetVariantSelectionAction instancecopyDeep()factory method to create a deep copy of ProductSelectionSetVariantSelectionAction@NotNull @Valid ProductResourceIdentifierResourceIdentifier of the Product@Valid ProductVariantSelectionDetermines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection.of()factory methodof(ProductSelectionSetVariantSelectionAction template) factory method to create a shallow copy ProductSelectionSetVariantSelectionActionvoidsetProduct(ProductResourceIdentifier product) ResourceIdentifier of the ProductvoidsetVariantSelection(ProductVariantSelection variantSelection) Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection.static com.fasterxml.jackson.core.type.TypeReference<ProductSelectionSetVariantSelectionAction>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithProductSelectionSetVariantSelectionAction(Function<ProductSelectionSetVariantSelectionAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.product_selection.ProductSelectionUpdateAction
getAction, withProductSelectionUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_VARIANT_SELECTION
discriminator value for ProductSelectionSetVariantSelectionAction- See Also:
-
-
Method Details
-
getProduct
ResourceIdentifier of the Product
- Returns:
- product
-
getVariantSelection
Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection. Leave it empty to unset an existing Variant Selection.
- Returns:
- variantSelection
-
setProduct
ResourceIdentifier of the Product
- Parameters:
product- value to be set
-
setVariantSelection
Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection. Leave it empty to unset an existing Variant Selection.
- Parameters:
variantSelection- value to be set
-
of
factory method- Returns:
- instance of ProductSelectionSetVariantSelectionAction
-
of
static ProductSelectionSetVariantSelectionAction of(ProductSelectionSetVariantSelectionAction template) factory method to create a shallow copy ProductSelectionSetVariantSelectionAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductSelectionSetVariantSelectionAction copyDeep()- Specified by:
copyDeepin interfaceProductSelectionUpdateAction
-
deepCopy
@Nullable static ProductSelectionSetVariantSelectionAction deepCopy(@Nullable ProductSelectionSetVariantSelectionAction template) factory method to create a deep copy of ProductSelectionSetVariantSelectionAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductSelectionSetVariantSelectionAction- Returns:
- builder
-
builder
static ProductSelectionSetVariantSelectionActionBuilder builder(ProductSelectionSetVariantSelectionAction template) create builder for ProductSelectionSetVariantSelectionAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductSelectionSetVariantSelectionAction
default <T> T withProductSelectionSetVariantSelectionAction(Function<ProductSelectionSetVariantSelectionAction, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<ProductSelectionSetVariantSelectionAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-