Class ProductVariantImportBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ProductVariantImport>
Example to create an instance using the builder pattern
ProductVariantImport productVariantImport = ProductVariantImport.builder()
.key("{key}")
.isMasterVariant(true)
.product(productBuilder -> productBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAssets
(Function<AssetBuilder, Asset> builder) Maps toProductVariant.assets
.addImages
(Function<ImageBuilder, Image> builder) Maps toProductVariant.images
.Maps toProductVariant.assets
.Maps toProductVariant.assets
.attributes
(Attribute... attributes) Maps toProductVariant.attributes
.attributes
(List<Attribute> attributes) Maps toProductVariant.attributes
.build()
builds ProductVariantImport with checking for non-null required valuesbuilds ProductVariantImport without checking for non-null required valuesMaps toProductVariant.assets
.Maps toProductVariant.attributes
.Maps toProductVariant.images
.Maps toProductVariant.isMasterVariant
.getKey()
User-defined unique identifier.The Product to which this Product Variant belongs.Ifpublish
is set to eithertrue
orfalse
, both staged and current projections are set to the same value provided by the import data.getSku()
Maps toProductVariant.sku
.Maps toProductVariant.images
.Maps toProductVariant.images
.isMasterVariant
(Boolean isMasterVariant) Maps toProductVariant.isMasterVariant
.User-defined unique identifier.static ProductVariantImportBuilder
of()
factory method for an instance of ProductVariantImportBuilderstatic ProductVariantImportBuilder
of
(ProductVariantImport template) create builder for ProductVariantImport instanceplusAssets
(Asset... assets) Maps toProductVariant.assets
.plusAssets
(Function<AssetBuilder, AssetBuilder> builder) Maps toProductVariant.assets
.plusAttributes
(Attribute... attributes) Maps toProductVariant.attributes
.plusAttributes
(Function<AttributeBuilder, io.vrap.rmf.base.client.Builder<? extends Attribute>> builder) Maps toProductVariant.attributes
.plusImages
(Image... images) Maps toProductVariant.images
.plusImages
(Function<ImageBuilder, ImageBuilder> builder) Maps toProductVariant.images
.product
(ProductKeyReference product) The Product to which this Product Variant belongs.The Product to which this Product Variant belongs.Ifpublish
is set to eithertrue
orfalse
, both staged and current projections are set to the same value provided by the import data.setAssets
(Function<AssetBuilder, Asset> builder) Maps toProductVariant.assets
.setImages
(Function<ImageBuilder, Image> builder) Maps toProductVariant.images
.Maps toProductVariant.sku
.withAssets
(Function<AssetBuilder, AssetBuilder> builder) Maps toProductVariant.assets
.withAttributes
(Function<AttributeBuilder, io.vrap.rmf.base.client.Builder<? extends Attribute>> builder) Maps toProductVariant.attributes
.withImages
(Function<ImageBuilder, ImageBuilder> builder) Maps toProductVariant.images
.The Product to which this Product Variant belongs.
-
Constructor Details
-
ProductVariantImportBuilder
public ProductVariantImportBuilder()
-
-
Method Details
-
key
User-defined unique identifier. If a ProductVariant with this
key
exists on the specifiedproduct
, it will be updated with the imported data.- Parameters:
key
- value to be set- Returns:
- Builder
-
sku
Maps to
ProductVariant.sku
.- Parameters:
sku
- value to be set- Returns:
- Builder
-
isMasterVariant
Maps to
ProductVariant.isMasterVariant
.- Parameters:
isMasterVariant
- value to be set- Returns:
- Builder
-
attributes
Maps to
ProductVariant.attributes
. The referenced attribute must be defined in an already existing ProductType in the project, or thestate
of the ImportOperation will beunresolved
.- Parameters:
attributes
- value to be set- Returns:
- Builder
-
attributes
Maps to
ProductVariant.attributes
. The referenced attribute must be defined in an already existing ProductType in the project, or thestate
of the ImportOperation will beunresolved
.- Parameters:
attributes
- value to be set- Returns:
- Builder
-
plusAttributes
Maps to
ProductVariant.attributes
. The referenced attribute must be defined in an already existing ProductType in the project, or thestate
of the ImportOperation will beunresolved
.- Parameters:
attributes
- value to be set- Returns:
- Builder
-
plusAttributes
public ProductVariantImportBuilder plusAttributes(Function<AttributeBuilder, io.vrap.rmf.base.client.Builder<? extends Attribute>> builder) Maps to
ProductVariant.attributes
. The referenced attribute must be defined in an already existing ProductType in the project, or thestate
of the ImportOperation will beunresolved
.- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
withAttributes
public ProductVariantImportBuilder withAttributes(Function<AttributeBuilder, io.vrap.rmf.base.client.Builder<? extends Attribute>> builder) Maps to
ProductVariant.attributes
. The referenced attribute must be defined in an already existing ProductType in the project, or thestate
of the ImportOperation will beunresolved
.- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
images
Maps to
ProductVariant.images
.- Parameters:
images
- value to be set- Returns:
- Builder
-
images
Maps to
ProductVariant.images
.- Parameters:
images
- value to be set- Returns:
- Builder
-
plusImages
Maps to
ProductVariant.images
.- Parameters:
images
- value to be set- Returns:
- Builder
-
plusImages
Maps to
ProductVariant.images
.- Parameters:
builder
- function to build the images value- Returns:
- Builder
-
withImages
Maps to
ProductVariant.images
.- Parameters:
builder
- function to build the images value- Returns:
- Builder
-
addImages
Maps to
ProductVariant.images
.- Parameters:
builder
- function to build the images value- Returns:
- Builder
-
setImages
Maps to
ProductVariant.images
.- Parameters:
builder
- function to build the images value- Returns:
- Builder
-
assets
Maps to
ProductVariant.assets
.- Parameters:
assets
- value to be set- Returns:
- Builder
-
assets
Maps to
ProductVariant.assets
.- Parameters:
assets
- value to be set- Returns:
- Builder
-
plusAssets
Maps to
ProductVariant.assets
.- Parameters:
assets
- value to be set- Returns:
- Builder
-
plusAssets
Maps to
ProductVariant.assets
.- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
withAssets
Maps to
ProductVariant.assets
.- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
addAssets
Maps to
ProductVariant.assets
.- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
setAssets
Maps to
ProductVariant.assets
.- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
publish
If
publish
is set to eithertrue
orfalse
, both staged and current projections are set to the same value provided by the import data. Ifpublish
is not set, the staged projection is set to the provided import data, but the current projection stays unchanged. However, if the import data contains no update, that is, if it matches the staged projection of the existing Product, the import induces no change in the existing Product whetherpublish
is set or not.- Parameters:
publish
- value to be set- Returns:
- Builder
-
product
public ProductVariantImportBuilder product(Function<ProductKeyReferenceBuilder, ProductKeyReferenceBuilder> builder) The Product to which this Product Variant belongs. Maps to
ProductVariant.product
. The Reference to the Product with which the ProductVariant is associated. If referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Product is created.- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
withProduct
public ProductVariantImportBuilder withProduct(Function<ProductKeyReferenceBuilder, ProductKeyReference> builder) The Product to which this Product Variant belongs. Maps to
ProductVariant.product
. The Reference to the Product with which the ProductVariant is associated. If referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Product is created.- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
product
The Product to which this Product Variant belongs. Maps to
ProductVariant.product
. The Reference to the Product with which the ProductVariant is associated. If referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Product is created.- Parameters:
product
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier. If a ProductVariant with this
key
exists on the specifiedproduct
, it will be updated with the imported data.- Returns:
- key
-
getSku
Maps to
ProductVariant.sku
.- Returns:
- sku
-
getIsMasterVariant
Maps to
ProductVariant.isMasterVariant
.- Returns:
- isMasterVariant
-
getAttributes
Maps to
ProductVariant.attributes
. The referenced attribute must be defined in an already existing ProductType in the project, or thestate
of the ImportOperation will beunresolved
.- Returns:
- attributes
-
getImages
Maps to
ProductVariant.images
.- Returns:
- images
-
getAssets
Maps to
ProductVariant.assets
.- Returns:
- assets
-
getPublish
If
publish
is set to eithertrue
orfalse
, both staged and current projections are set to the same value provided by the import data. Ifpublish
is not set, the staged projection is set to the provided import data, but the current projection stays unchanged. However, if the import data contains no update, that is, if it matches the staged projection of the existing Product, the import induces no change in the existing Product whetherpublish
is set or not.- Returns:
- publish
-
getProduct
The Product to which this Product Variant belongs. Maps to
ProductVariant.product
. The Reference to the Product with which the ProductVariant is associated. If referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Product is created.- Returns:
- product
-
build
builds ProductVariantImport with checking for non-null required values- Specified by:
build
in interfaceio.vrap.rmf.base.client.Builder<ProductVariantImport>
- Returns:
- ProductVariantImport
-
buildUnchecked
builds ProductVariantImport without checking for non-null required values- Returns:
- ProductVariantImport
-
of
factory method for an instance of ProductVariantImportBuilder- Returns:
- builder
-
of
create builder for ProductVariantImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-