Class ProductSelectionSetVariantSelectionActionBuilder
java.lang.Object
com.commercetools.api.models.product_selection.ProductSelectionSetVariantSelectionActionBuilder
- All Implemented Interfaces:
Builder<ProductSelectionSetVariantSelectionAction>
public class ProductSelectionSetVariantSelectionActionBuilder
extends Object
implements Builder<ProductSelectionSetVariantSelectionAction>
ProductSelectionSetVariantSelectionActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductSelectionSetVariantSelectionAction productSelectionSetVariantSelectionAction = ProductSelectionSetVariantSelectionAction.builder()
.product(productBuilder -> productBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductSelectionSetVariantSelectionAction with checking for non-null required valuesbuilds ProductSelectionSetVariantSelectionAction without checking for non-null required valuesResourceIdentifier of the ProductDetermines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection.of()
factory method for an instance of ProductSelectionSetVariantSelectionActionBuilderof
(ProductSelectionSetVariantSelectionAction template) create builder for ProductSelectionSetVariantSelectionAction instanceproduct
(ProductResourceIdentifier product) ResourceIdentifier of the ProductResourceIdentifier of the ProductvariantSelection
(ProductVariantSelection variantSelection) Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection.variantSelection
(Function<ProductVariantSelectionBuilder, Builder<? extends ProductVariantSelection>> builder) Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection.ResourceIdentifier of the Product
-
Constructor Details
-
ProductSelectionSetVariantSelectionActionBuilder
public ProductSelectionSetVariantSelectionActionBuilder()
-
-
Method Details
-
product
public ProductSelectionSetVariantSelectionActionBuilder product(Function<ProductResourceIdentifierBuilder, ProductResourceIdentifierBuilder> builder) ResourceIdentifier of the Product
- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
withProduct
public ProductSelectionSetVariantSelectionActionBuilder 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 ProductSelectionSetVariantSelectionActionBuilder variantSelection(@Nullable ProductVariantSelection variantSelection) Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection. Leave it empty to unset an existing Variant Selection.
- Parameters:
variantSelection
- value to be set- Returns:
- Builder
-
variantSelection
public ProductSelectionSetVariantSelectionActionBuilder variantSelection(Function<ProductVariantSelectionBuilder, Builder<? extends ProductVariantSelection>> builder) Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection. Leave it empty to unset an existing Variant Selection.
- Parameters:
builder
- function to build the variantSelection value- Returns:
- Builder
-
getProduct
ResourceIdentifier of the Product
- Returns:
- product
-
getVariantSelection
Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection. Leave it empty to unset an existing Variant Selection.
- Returns:
- variantSelection
-
build
builds ProductSelectionSetVariantSelectionAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSelectionSetVariantSelectionAction>
- Returns:
- ProductSelectionSetVariantSelectionAction
-
buildUnchecked
builds ProductSelectionSetVariantSelectionAction without checking for non-null required values- Returns:
- ProductSelectionSetVariantSelectionAction
-
of
factory method for an instance of ProductSelectionSetVariantSelectionActionBuilder- Returns:
- builder
-
of
public static ProductSelectionSetVariantSelectionActionBuilder of(ProductSelectionSetVariantSelectionAction template) create builder for ProductSelectionSetVariantSelectionAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-