Interface ProductSetDefaultVariantAction
- All Superinterfaces:
ProductUpdateAction,ResourceUpdateAction<ProductUpdateAction>
Sets the defaultVariant of the Product. Only available for Projects with productCatalogModel set to Modular. The Variant must belong to the Product. If variant is omitted, any existing default Variant is cleared.
Example to create an instance using the builder pattern
ProductSetDefaultVariantAction productSetDefaultVariantAction = ProductSetDefaultVariantAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for ProductSetDefaultVariantAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ProductSetDefaultVariantActionbuilder(ProductSetDefaultVariantAction template) create builder for ProductSetDefaultVariantAction instancecopyDeep()deepCopy(ProductSetDefaultVariantAction template) factory method to create a deep copy of ProductSetDefaultVariantActionIftrue, only the stageddefaultVariantis updated.@Valid VariantResourceIdentifierThe Variant to set as default.of()factory methodof(ProductSetDefaultVariantAction template) factory method to create a shallow copy ProductSetDefaultVariantActionvoidIftrue, only the stageddefaultVariantis updated.voidsetVariant(VariantResourceIdentifier variant) The Variant to set as default.static tools.jackson.core.type.TypeReference<ProductSetDefaultVariantAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductUpdateAction
getAction, withProductUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_DEFAULT_VARIANT
discriminator value for ProductSetDefaultVariantAction- See Also:
-
-
Method Details
-
getVariant
The Variant to set as default. If empty, any existing value will be removed.
- Returns:
- variant
-
getStaged
Boolean getStaged()If
true, only the stageddefaultVariantis updated. Iffalse, both the current and stageddefaultVariantare updated.- Returns:
- staged
-
setVariant
The Variant to set as default. If empty, any existing value will be removed.
- Parameters:
variant- value to be set
-
setStaged
If
true, only the stageddefaultVariantis updated. Iffalse, both the current and stageddefaultVariantare updated.- Parameters:
staged- value to be set
-
of
factory method- Returns:
- instance of ProductSetDefaultVariantAction
-
of
factory method to create a shallow copy ProductSetDefaultVariantAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductSetDefaultVariantAction copyDeep()- Specified by:
copyDeepin interfaceProductUpdateAction
-
deepCopy
@Nullable static ProductSetDefaultVariantAction deepCopy(@Nullable ProductSetDefaultVariantAction template) factory method to create a deep copy of ProductSetDefaultVariantAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductSetDefaultVariantAction- Returns:
- builder
-
builder
create builder for ProductSetDefaultVariantAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductSetDefaultVariantAction
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
-