Class ProductVariantTailoringDraftBuilder
- All Implemented Interfaces:
Builder<ProductVariantTailoringDraft>
Example to create an instance using the builder pattern
ProductVariantTailoringDraft productVariantTailoringDraft = ProductVariantTailoringDraft.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAssets
(Function<AssetBuilder, Asset> builder) Media assets of the tailored Product Variant.Attributes of the tailored Product Variant according to the respective AttributeDefinition.addImages
(Function<ImageBuilder, Image> builder) Images of the tailored Product Variant.Media assets of the tailored Product Variant.Media assets of the tailored Product Variant.attributes
(ProductTailoringAttribute... attributes) Attributes of the tailored Product Variant according to the respective AttributeDefinition.attributes
(List<ProductTailoringAttribute> attributes) Attributes of the tailored Product Variant according to the respective AttributeDefinition.build()
builds ProductVariantTailoringDraft with checking for non-null required valuesbuilds ProductVariantTailoringDraft without checking for non-null required valuesMedia assets of the tailored Product Variant.Attributes of the tailored Product Variant according to the respective AttributeDefinition.getId()
Theid
of the ProductVariant to be tailored.Images of the tailored Product Variant.getSku()
Thesku
of the ProductVariant to be tailored.Theid
of the ProductVariant to be tailored.Images of the tailored Product Variant.Images of the tailored Product Variant.of()
factory method for an instance of ProductVariantTailoringDraftBuilderof
(ProductVariantTailoringDraft template) create builder for ProductVariantTailoringDraft instanceplusAssets
(Asset... assets) Media assets of the tailored Product Variant.plusAssets
(Function<AssetBuilder, AssetBuilder> builder) Media assets of the tailored Product Variant.plusAttributes
(ProductTailoringAttribute... attributes) Attributes of the tailored Product Variant according to the respective AttributeDefinition.Attributes of the tailored Product Variant according to the respective AttributeDefinition.plusImages
(Image... images) Images of the tailored Product Variant.plusImages
(Function<ImageBuilder, ImageBuilder> builder) Images of the tailored Product Variant.setAssets
(Function<AssetBuilder, Asset> builder) Media assets of the tailored Product Variant.Attributes of the tailored Product Variant according to the respective AttributeDefinition.setImages
(Function<ImageBuilder, Image> builder) Images of the tailored Product Variant.Thesku
of the ProductVariant to be tailored.withAssets
(Function<AssetBuilder, AssetBuilder> builder) Media assets of the tailored Product Variant.Attributes of the tailored Product Variant according to the respective AttributeDefinition.withImages
(Function<ImageBuilder, ImageBuilder> builder) Images of the tailored Product Variant.
-
Constructor Details
-
ProductVariantTailoringDraftBuilder
public ProductVariantTailoringDraftBuilder()
-
-
Method Details
-
id
The
id
of the ProductVariant to be tailored.- Parameters:
id
- value to be set- Returns:
- Builder
-
sku
The
sku
of the ProductVariant to be tailored.- Parameters:
sku
- value to be set- Returns:
- Builder
-
images
Images of the tailored Product Variant.
- Parameters:
images
- value to be set- Returns:
- Builder
-
images
Images of the tailored Product Variant.
- Parameters:
images
- value to be set- Returns:
- Builder
-
plusImages
Images of the tailored Product Variant.
- Parameters:
images
- value to be set- Returns:
- Builder
-
plusImages
Images of the tailored Product Variant.
- Parameters:
builder
- function to build the images value- Returns:
- Builder
-
withImages
Images of the tailored Product Variant.
- Parameters:
builder
- function to build the images value- Returns:
- Builder
-
addImages
Images of the tailored Product Variant.
- Parameters:
builder
- function to build the images value- Returns:
- Builder
-
setImages
Images of the tailored Product Variant.
- Parameters:
builder
- function to build the images value- Returns:
- Builder
-
assets
Media assets of the tailored Product Variant.
- Parameters:
assets
- value to be set- Returns:
- Builder
-
assets
Media assets of the tailored Product Variant.
- Parameters:
assets
- value to be set- Returns:
- Builder
-
plusAssets
Media assets of the tailored Product Variant.
- Parameters:
assets
- value to be set- Returns:
- Builder
-
plusAssets
Media assets of the tailored Product Variant.
- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
withAssets
Media assets of the tailored Product Variant.
- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
addAssets
Media assets of the tailored Product Variant.
- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
setAssets
Media assets of the tailored Product Variant.
- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
attributes
public ProductVariantTailoringDraftBuilder attributes(@Nullable ProductTailoringAttribute... attributes) Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the
attributes
of the corresponding ProductVariant:- If the ProductVariant contains an Attribute with the same
name
, itsvalue
is overwritten, - otherwise the Attribute and its value are added to the ProductVariant.
- Parameters:
attributes
- value to be set- Returns:
- Builder
- If the ProductVariant contains an Attribute with the same
-
attributes
public ProductVariantTailoringDraftBuilder attributes(@Nullable List<ProductTailoringAttribute> attributes) Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the
attributes
of the corresponding ProductVariant:- If the ProductVariant contains an Attribute with the same
name
, itsvalue
is overwritten, - otherwise the Attribute and its value are added to the ProductVariant.
- Parameters:
attributes
- value to be set- Returns:
- Builder
- If the ProductVariant contains an Attribute with the same
-
plusAttributes
public ProductVariantTailoringDraftBuilder plusAttributes(@Nullable ProductTailoringAttribute... attributes) Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the
attributes
of the corresponding ProductVariant:- If the ProductVariant contains an Attribute with the same
name
, itsvalue
is overwritten, - otherwise the Attribute and its value are added to the ProductVariant.
- Parameters:
attributes
- value to be set- Returns:
- Builder
- If the ProductVariant contains an Attribute with the same
-
plusAttributes
public ProductVariantTailoringDraftBuilder plusAttributes(Function<ProductTailoringAttributeBuilder, ProductTailoringAttributeBuilder> builder) Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the
attributes
of the corresponding ProductVariant:- If the ProductVariant contains an Attribute with the same
name
, itsvalue
is overwritten, - otherwise the Attribute and its value are added to the ProductVariant.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
- If the ProductVariant contains an Attribute with the same
-
withAttributes
public ProductVariantTailoringDraftBuilder withAttributes(Function<ProductTailoringAttributeBuilder, ProductTailoringAttributeBuilder> builder) Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the
attributes
of the corresponding ProductVariant:- If the ProductVariant contains an Attribute with the same
name
, itsvalue
is overwritten, - otherwise the Attribute and its value are added to the ProductVariant.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
- If the ProductVariant contains an Attribute with the same
-
addAttributes
public ProductVariantTailoringDraftBuilder addAttributes(Function<ProductTailoringAttributeBuilder, ProductTailoringAttribute> builder) Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the
attributes
of the corresponding ProductVariant:- If the ProductVariant contains an Attribute with the same
name
, itsvalue
is overwritten, - otherwise the Attribute and its value are added to the ProductVariant.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
- If the ProductVariant contains an Attribute with the same
-
setAttributes
public ProductVariantTailoringDraftBuilder setAttributes(Function<ProductTailoringAttributeBuilder, ProductTailoringAttribute> builder) Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the
attributes
of the corresponding ProductVariant:- If the ProductVariant contains an Attribute with the same
name
, itsvalue
is overwritten, - otherwise the Attribute and its value are added to the ProductVariant.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
- If the ProductVariant contains an Attribute with the same
-
getId
The
id
of the ProductVariant to be tailored.- Returns:
- id
-
getSku
The
sku
of the ProductVariant to be tailored.- Returns:
- sku
-
getImages
Images of the tailored Product Variant.
- Returns:
- images
-
getAssets
Media assets of the tailored Product Variant.
- Returns:
- assets
-
getAttributes
Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the
attributes
of the corresponding ProductVariant:- If the ProductVariant contains an Attribute with the same
name
, itsvalue
is overwritten, - otherwise the Attribute and its value are added to the ProductVariant.
- Returns:
- attributes
- If the ProductVariant contains an Attribute with the same
-
build
builds ProductVariantTailoringDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductVariantTailoringDraft>
- Returns:
- ProductVariantTailoringDraft
-
buildUnchecked
builds ProductVariantTailoringDraft without checking for non-null required values- Returns:
- ProductVariantTailoringDraft
-
of
factory method for an instance of ProductVariantTailoringDraftBuilder- Returns:
- builder
-
of
create builder for ProductVariantTailoringDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-