Class ProductSelectionAddProductActionBuilder
java.lang.Object
com.commercetools.api.models.product_selection.ProductSelectionAddProductActionBuilder
- All Implemented Interfaces:
Builder<ProductSelectionAddProductAction>
public class ProductSelectionAddProductActionBuilder
extends Object
implements Builder<ProductSelectionAddProductAction>
ProductSelectionAddProductActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductSelectionAddProductAction productSelectionAddProductAction = ProductSelectionAddProductAction.builder()
.product(productBuilder -> productBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductSelectionAddProductAction with checking for non-null required valuesbuilds ProductSelectionAddProductAction without checking for non-null required valuesResourceIdentifier of the ProductDefines which Variants of the Product will be included in the Product Selection.of()
factory method for an instance of ProductSelectionAddProductActionBuilderof
(ProductSelectionAddProductAction template) create builder for ProductSelectionAddProductAction instanceproduct
(ProductResourceIdentifier product) ResourceIdentifier of the ProductResourceIdentifier of the ProductvariantSelection
(ProductVariantSelection variantSelection) Defines which Variants of the Product will be included in the Product Selection.variantSelection
(Function<ProductVariantSelectionBuilder, Builder<? extends ProductVariantSelection>> builder) Defines which Variants of the Product will be included in the Product Selection.ResourceIdentifier of the Product
-
Constructor Details
-
ProductSelectionAddProductActionBuilder
public ProductSelectionAddProductActionBuilder()
-
-
Method Details
-
product
public ProductSelectionAddProductActionBuilder product(Function<ProductResourceIdentifierBuilder, ProductResourceIdentifierBuilder> builder) ResourceIdentifier of the Product
- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
withProduct
public ProductSelectionAddProductActionBuilder withProduct(Function<ProductResourceIdentifierBuilder, ProductResourceIdentifier> builder) ResourceIdentifier of the Product
- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
product
ResourceIdentifier of the Product
- Parameters:
product
- value to be set- Returns:
- Builder
-
variantSelection
public ProductSelectionAddProductActionBuilder variantSelection(@Nullable ProductVariantSelection variantSelection) Defines which Variants of the Product will be included in the Product Selection. If not supplied all Variants are deemed to be included.
- Parameters:
variantSelection
- value to be set- Returns:
- Builder
-
variantSelection
public ProductSelectionAddProductActionBuilder variantSelection(Function<ProductVariantSelectionBuilder, Builder<? extends ProductVariantSelection>> builder) Defines which Variants of the Product will be included in the Product Selection. If not supplied all Variants are deemed to be included.
- Parameters:
builder
- function to build the variantSelection value- Returns:
- Builder
-
getProduct
ResourceIdentifier of the Product
- Returns:
- product
-
getVariantSelection
Defines which Variants of the Product will be included in the Product Selection. If not supplied all Variants are deemed to be included.
- Returns:
- variantSelection
-
build
builds ProductSelectionAddProductAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSelectionAddProductAction>
- Returns:
- ProductSelectionAddProductAction
-
buildUnchecked
builds ProductSelectionAddProductAction without checking for non-null required values- Returns:
- ProductSelectionAddProductAction
-
of
factory method for an instance of ProductSelectionAddProductActionBuilder- Returns:
- builder
-
of
create builder for ProductSelectionAddProductAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-