Class ProductSetAssetSourcesActionBuilder
java.lang.Object
com.commercetools.api.models.product.ProductSetAssetSourcesActionBuilder
- All Implemented Interfaces:
Builder<ProductSetAssetSourcesAction>
public class ProductSetAssetSourcesActionBuilder
extends Object
implements Builder<ProductSetAssetSourcesAction>
ProductSetAssetSourcesActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductSetAssetSourcesAction productSetAssetSourcesAction = ProductSetAssetSourcesAction.builder()
.plusSources(sourcesBuilder -> sourcesBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddSources
(Function<AssetSourceBuilder, AssetSource> builder) Value to set.Theid
of the Asset to update.Thekey
of the Asset to update.build()
builds ProductSetAssetSourcesAction with checking for non-null required valuesbuilds ProductSetAssetSourcesAction without checking for non-null required valuesTheid
of the Asset to update.Thekey
of the Asset to update.getSku()
Thesku
of the ProductVariant to update.Value to set.Iftrue
, only the staged Asset is updated.Theid
of the ProductVariant to update.of()
factory method for an instance of ProductSetAssetSourcesActionBuilderof
(ProductSetAssetSourcesAction template) create builder for ProductSetAssetSourcesAction instanceplusSources
(AssetSource... sources) Value to set.Value to set.setSources
(Function<AssetSourceBuilder, AssetSource> builder) Value to set.Thesku
of the ProductVariant to update.sources
(AssetSource... sources) Value to set.sources
(List<AssetSource> sources) Value to set.Iftrue
, only the staged Asset is updated.Theid
of the ProductVariant to update.Value to set.
-
Constructor Details
-
ProductSetAssetSourcesActionBuilder
public ProductSetAssetSourcesActionBuilder()
-
-
Method Details
-
variantId
The
id
of the ProductVariant to update.- Parameters:
variantId
- value to be set- Returns:
- Builder
-
sku
The
sku
of the ProductVariant to update.- Parameters:
sku
- value to be set- Returns:
- Builder
-
staged
If
true
, only the staged Asset is updated. Iffalse
both the current and staged Asset is updated.- Parameters:
staged
- value to be set- Returns:
- Builder
-
assetId
The
id
of the Asset to update.- Parameters:
assetId
- value to be set- Returns:
- Builder
-
assetKey
The
key
of the Asset to update.- Parameters:
assetKey
- value to be set- Returns:
- Builder
-
sources
Value to set.
- Parameters:
sources
- value to be set- Returns:
- Builder
-
sources
Value to set.
- Parameters:
sources
- value to be set- Returns:
- Builder
-
plusSources
Value to set.
- Parameters:
sources
- value to be set- Returns:
- Builder
-
plusSources
public ProductSetAssetSourcesActionBuilder plusSources(Function<AssetSourceBuilder, AssetSourceBuilder> builder) Value to set.
- Parameters:
builder
- function to build the sources value- Returns:
- Builder
-
withSources
public ProductSetAssetSourcesActionBuilder withSources(Function<AssetSourceBuilder, AssetSourceBuilder> builder) Value to set.
- Parameters:
builder
- function to build the sources value- Returns:
- Builder
-
addSources
public ProductSetAssetSourcesActionBuilder addSources(Function<AssetSourceBuilder, AssetSource> builder) Value to set.
- Parameters:
builder
- function to build the sources value- Returns:
- Builder
-
setSources
public ProductSetAssetSourcesActionBuilder setSources(Function<AssetSourceBuilder, AssetSource> builder) Value to set.
- Parameters:
builder
- function to build the sources value- Returns:
- Builder
-
getVariantId
The
id
of the ProductVariant to update.- Returns:
- variantId
-
getSku
The
sku
of the ProductVariant to update.- Returns:
- sku
-
getStaged
If
true
, only the staged Asset is updated. Iffalse
both the current and staged Asset is updated.- Returns:
- staged
-
getAssetId
The
id
of the Asset to update.- Returns:
- assetId
-
getAssetKey
The
key
of the Asset to update.- Returns:
- assetKey
-
getSources
Value to set.
- Returns:
- sources
-
build
builds ProductSetAssetSourcesAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSetAssetSourcesAction>
- Returns:
- ProductSetAssetSourcesAction
-
buildUnchecked
builds ProductSetAssetSourcesAction without checking for non-null required values- Returns:
- ProductSetAssetSourcesAction
-
of
factory method for an instance of ProductSetAssetSourcesActionBuilder- Returns:
- builder
-
of
create builder for ProductSetAssetSourcesAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-