Class VariantAddAssetActionBuilder
java.lang.Object
com.commercetools.api.models.variant.VariantAddAssetActionBuilder
- All Implemented Interfaces:
Builder<VariantAddAssetAction>
VariantAddAssetActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
VariantAddAssetAction variantAddAssetAction = VariantAddAssetAction.builder()
.asset(assetBuilder -> assetBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasset(AssetDraft asset) Value to append.asset(Function<AssetDraftBuilder, AssetDraftBuilder> builder) Value to append.build()builds VariantAddAssetAction with checking for non-null required valuesbuilds VariantAddAssetAction without checking for non-null required valuesgetAsset()Value to append.Position inassetswhere the Asset should be put.Iftrue, only the stagedassetsare updated.static VariantAddAssetActionBuilderof()factory method for an instance of VariantAddAssetActionBuilderstatic VariantAddAssetActionBuilderof(VariantAddAssetAction template) create builder for VariantAddAssetAction instancePosition inassetswhere the Asset should be put.Iftrue, only the stagedassetsare updated.withAsset(Function<AssetDraftBuilder, AssetDraft> builder) Value to append.
-
Constructor Details
-
VariantAddAssetActionBuilder
public VariantAddAssetActionBuilder()
-
-
Method Details
-
staged
If
true, only the stagedassetsare updated. Iffalse, both the current and stagedassetsare updated.- Parameters:
staged- value to be set- Returns:
- Builder
-
asset
Value to append.
- Parameters:
builder- function to build the asset value- Returns:
- Builder
-
withAsset
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
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- Returns:
- Builder
-
getStaged
If
true, only the stagedassetsare updated. Iffalse, both the current and stagedassetsare updated.- Returns:
- staged
-
getAsset
Value to append.
- Returns:
- asset
-
getPosition
Position in
assetswhere the Asset should be put. When specified, the value must be between0and the total number of Assets minus1.- Returns:
- position
-
build
builds VariantAddAssetAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<VariantAddAssetAction>- Returns:
- VariantAddAssetAction
-
buildUnchecked
builds VariantAddAssetAction without checking for non-null required values- Returns:
- VariantAddAssetAction
-
of
factory method for an instance of VariantAddAssetActionBuilder- Returns:
- builder
-
of
create builder for VariantAddAssetAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-