Class ProductTailoringAddAssetActionBuilder
java.lang.Object
com.commercetools.api.models.product_tailoring.ProductTailoringAddAssetActionBuilder
- All Implemented Interfaces:
Builder<ProductTailoringAddAssetAction>
public class ProductTailoringAddAssetActionBuilder
extends Object
implements Builder<ProductTailoringAddAssetAction>
ProductTailoringAddAssetActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductTailoringAddAssetAction productTailoringAddAssetAction = ProductTailoringAddAssetAction.builder()
.asset(assetBuilder -> assetBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasset
(AssetDraft asset) Value to append.asset
(Function<AssetDraftBuilder, AssetDraftBuilder> builder) Value to append.build()
builds ProductTailoringAddAssetAction with checking for non-null required valuesbuilds ProductTailoringAddAssetAction without checking for non-null required valuesgetAsset()
Value to append.Position inassets
where the Asset should be put.getSku()
Thesku
of the tailored ProductVariant to update.Iftrue
, only the stagedassets
are updated.Theid
of the tailored ProductVariant to update.of()
factory method for an instance of ProductTailoringAddAssetActionBuilderof
(ProductTailoringAddAssetAction template) create builder for ProductTailoringAddAssetAction instancePosition inassets
where the Asset should be put.Thesku
of the tailored ProductVariant to update.Iftrue
, only the stagedassets
are updated.Theid
of the tailored ProductVariant to update.withAsset
(Function<AssetDraftBuilder, AssetDraft> builder) Value to append.
-
Constructor Details
-
ProductTailoringAddAssetActionBuilder
public ProductTailoringAddAssetActionBuilder()
-
-
Method Details
-
variantId
The
id
of the tailored ProductVariant to update.- Parameters:
variantId
- value to be set- Returns:
- Builder
-
sku
The
sku
of the tailored ProductVariant to update.- Parameters:
sku
- value to be set- Returns:
- Builder
-
staged
If
true
, only the stagedassets
are updated. Iffalse
, both the current and stagedassets
are updated.- Parameters:
staged
- value to be set- Returns:
- Builder
-
asset
public ProductTailoringAddAssetActionBuilder asset(Function<AssetDraftBuilder, AssetDraftBuilder> builder) Value to append.
- Parameters:
builder
- function to build the asset value- Returns:
- Builder
-
withAsset
public ProductTailoringAddAssetActionBuilder withAsset(Function<AssetDraftBuilder, AssetDraft> builder) Value to append.
- Parameters:
builder
- function to build the asset value- Returns:
- Builder
-
asset
Value to append.
- Parameters:
asset
- value to be set- Returns:
- Builder
-
position
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- Returns:
- Builder
-
getVariantId
The
id
of the tailored ProductVariant to update.- Returns:
- variantId
-
getSku
The
sku
of the tailored ProductVariant to update.- Returns:
- sku
-
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
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
-
build
builds ProductTailoringAddAssetAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductTailoringAddAssetAction>
- Returns:
- ProductTailoringAddAssetAction
-
buildUnchecked
builds ProductTailoringAddAssetAction without checking for non-null required values- Returns:
- ProductTailoringAddAssetAction
-
of
factory method for an instance of ProductTailoringAddAssetActionBuilder- Returns:
- builder
-
of
create builder for ProductTailoringAddAssetAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-