Interface ProductAddAssetAction
- All Superinterfaces:
ProductUpdateAction
,ResourceUpdateAction<ProductUpdateAction>
Either variantId
or sku
is required.
Example to create an instance using the builder pattern
ProductAddAssetAction productAddAssetAction = ProductAddAssetAction.builder()
.asset(assetBuilder -> assetBuilder)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductAddAssetActionBuilder
builder()
builder factory method for ProductAddAssetActionstatic ProductAddAssetActionBuilder
builder
(ProductAddAssetAction template) create builder for ProductAddAssetAction instancestatic ProductAddAssetAction
deepCopy
(ProductAddAssetAction template) factory method to create a deep copy of ProductAddAssetAction@NotNull @Valid AssetDraft
getAsset()
Value to append.Position inassets
where the Asset should be put.getSku()
Thesku
of the ProductVariant to update.Iftrue
, only the stagedassets
are updated.Theid
of the ProductVariant to update.static ProductAddAssetAction
of()
factory methodstatic ProductAddAssetAction
of
(ProductAddAssetAction template) factory method to create a shallow copy ProductAddAssetActionvoid
setAsset
(AssetDraft asset) Value to append.void
setPosition
(Integer position) Position inassets
where the Asset should be put.void
Thesku
of the ProductVariant to update.void
Iftrue
, only the stagedassets
are updated.void
setVariantId
(Long variantId) Theid
of the ProductVariant to update.static com.fasterxml.jackson.core.type.TypeReference<ProductAddAssetAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductUpdateAction
getAction, withProductUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
ADD_ASSET
discriminator value for ProductAddAssetAction- See Also:
-
-
Method Details
-
getVariantId
Long getVariantId()The
id
of the ProductVariant to update.- Returns:
- variantId
-
getSku
String getSku()The
sku
of the ProductVariant to update.- Returns:
- sku
-
getStaged
Boolean getStaged()If
true
, only the stagedassets
are updated. Iffalse
, both the current and stagedassets
are updated.- Returns:
- staged
-
getAsset
Value to append.
- Returns:
- asset
-
getPosition
Integer getPosition()Position in
assets
where the Asset should be put. When specified, the value must be between0
and the total number of Assets minus1
.- Returns:
- position
-
setVariantId
The
id
of the ProductVariant to update.- Parameters:
variantId
- value to be set
-
setSku
The
sku
of the ProductVariant to update.- Parameters:
sku
- value to be set
-
setStaged
If
true
, only the stagedassets
are updated. Iffalse
, both the current and stagedassets
are updated.- Parameters:
staged
- value to be set
-
setAsset
Value to append.
- Parameters:
asset
- value to be set
-
setPosition
Position in
assets
where the Asset should be put. When specified, the value must be between0
and the total number of Assets minus1
.- Parameters:
position
- value to be set
-
of
factory method- Returns:
- instance of ProductAddAssetAction
-
of
factory method to create a shallow copy ProductAddAssetAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ProductAddAssetAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductAddAssetAction- Returns:
- builder
-
builder
create builder for ProductAddAssetAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductAddAssetAction
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
-