Interface ProductTailoringAddAssetAction
- All Superinterfaces:
ProductTailoringUpdateAction
Either variantId or sku is required to reference a ProductVariant that exists.
Example to create an instance using the builder pattern
ProductTailoringAddAssetAction productTailoringAddAssetAction = ProductTailoringAddAssetAction.builder()
.asset(assetBuilder -> assetBuilder)
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ProductTailoringAddAssetActionbuilder(ProductTailoringAddAssetAction template) create builder for ProductTailoringAddAssetAction instancecopyDeep()deepCopy(ProductTailoringAddAssetAction template) factory method to create a deep copy of ProductTailoringAddAssetAction@NotNull @Valid AssetDraftgetAsset()Value to append.Position inassetswhere the Asset should be put.getSku()Theskuof the tailored ProductVariant to update.Iftrue, only the stagedassetsare updated.Theidof the tailored ProductVariant to update.of()factory methodof(ProductTailoringAddAssetAction template) factory method to create a shallow copy ProductTailoringAddAssetActionvoidsetAsset(AssetDraft asset) Value to append.voidsetPosition(Integer position) Position inassetswhere the Asset should be put.voidTheskuof the tailored ProductVariant to update.voidIftrue, only the stagedassetsare updated.voidsetVariantId(Long variantId) Theidof the tailored ProductVariant to update.static com.fasterxml.jackson.core.type.TypeReference<ProductTailoringAddAssetAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.product_tailoring.ProductTailoringUpdateAction
getAction, withProductTailoringUpdateAction
-
Field Details
-
ADD_ASSET
discriminator value for ProductTailoringAddAssetAction- See Also:
-
-
Method Details
-
getVariantId
Long getVariantId()The
idof the tailored ProductVariant to update.- Returns:
- variantId
-
getSku
String getSku()The
skuof the tailored ProductVariant to update.- Returns:
- sku
-
getStaged
Boolean getStaged()If
true, only the stagedassetsare updated. Iffalse, both the current and stagedassetsare updated.- Returns:
- staged
-
getAsset
Value to append.
- Returns:
- asset
-
getPosition
Integer getPosition()Position in
assetswhere the Asset should be put. When specified, the value must be between0and the total number of Assets minus1.- Returns:
- position
-
setVariantId
The
idof the tailored ProductVariant to update.- Parameters:
variantId- value to be set
-
setSku
The
skuof the tailored ProductVariant to update.- Parameters:
sku- value to be set
-
setStaged
If
true, only the stagedassetsare updated. Iffalse, both the current and stagedassetsare updated.- Parameters:
staged- value to be set
-
setAsset
Value to append.
- Parameters:
asset- value to be set
-
setPosition
Position in
assetswhere the Asset should be put. When specified, the value must be between0and the total number of Assets minus1.- Parameters:
position- value to be set
-
of
factory method- Returns:
- instance of ProductTailoringAddAssetAction
-
of
factory method to create a shallow copy ProductTailoringAddAssetAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductTailoringAddAssetAction copyDeep()- Specified by:
copyDeepin interfaceProductTailoringUpdateAction
-
deepCopy
@Nullable static ProductTailoringAddAssetAction deepCopy(@Nullable ProductTailoringAddAssetAction template) factory method to create a deep copy of ProductTailoringAddAssetAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductTailoringAddAssetAction- Returns:
- builder
-
builder
create builder for ProductTailoringAddAssetAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductTailoringAddAssetAction
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<ProductTailoringAddAssetAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-