Interface VariantAddAssetAction
- All Superinterfaces:
VariantUpdateAction
Adds an asset to existing variant's assets.
Example to create an instance using the builder pattern
VariantAddAssetAction variantAddAssetAction = VariantAddAssetAction.builder()
.asset(assetBuilder -> assetBuilder)
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic VariantAddAssetActionBuilderbuilder()builder factory method for VariantAddAssetActionstatic VariantAddAssetActionBuilderbuilder(VariantAddAssetAction template) create builder for VariantAddAssetAction instancecopyDeep()static VariantAddAssetActiondeepCopy(VariantAddAssetAction template) factory method to create a deep copy of VariantAddAssetAction@NotNull @Valid AssetDraftgetAsset()Value to append.Position inassetswhere the Asset should be put.Iftrue, only the stagedassetsare updated.static VariantAddAssetActionof()factory methodstatic VariantAddAssetActionof(VariantAddAssetAction template) factory method to create a shallow copy VariantAddAssetActionvoidsetAsset(AssetDraft asset) Value to append.voidsetPosition(Integer position) Position inassetswhere the Asset should be put.voidIftrue, only the stagedassetsare updated.static tools.jackson.core.type.TypeReference<VariantAddAssetAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.variant.VariantUpdateAction
getAction, withVariantUpdateAction
-
Field Details
-
ADD_ASSET
discriminator value for VariantAddAssetAction- See Also:
-
-
Method Details
-
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
-
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 VariantAddAssetAction
-
of
factory method to create a shallow copy VariantAddAssetAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
VariantAddAssetAction copyDeep()- Specified by:
copyDeepin interfaceVariantUpdateAction
-
deepCopy
factory method to create a deep copy of VariantAddAssetAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for VariantAddAssetAction- Returns:
- builder
-
builder
create builder for VariantAddAssetAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withVariantAddAssetAction
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
-