Class ProductSelectionProductAddedMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.ProductSelectionProductAddedMessagePayloadBuilder
- All Implemented Interfaces:
Builder<ProductSelectionProductAddedMessagePayload>
public class ProductSelectionProductAddedMessagePayloadBuilder
extends Object
implements Builder<ProductSelectionProductAddedMessagePayload>
ProductSelectionProductAddedMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductSelectionProductAddedMessagePayload productSelectionProductAddedMessagePayload = ProductSelectionProductAddedMessagePayload.builder()
.product(productBuilder -> productBuilder)
.variantSelection(variantSelectionBuilder -> variantSelectionBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductSelectionProductAddedMessagePayload with checking for non-null required valuesbuilds ProductSelectionProductAddedMessagePayload without checking for non-null required valuesProduct that was added to the Product Selection.Product Variant Selection after the Add Product update action.of()
factory method for an instance of ProductSelectionProductAddedMessagePayloadBuilderof
(ProductSelectionProductAddedMessagePayload template) create builder for ProductSelectionProductAddedMessagePayload instanceproduct
(ProductReference product) Product that was added to the Product Selection.Product that was added to the Product Selection.variantSelection
(ProductVariantSelection variantSelection) Product Variant Selection after the Add Product update action.variantSelection
(Function<ProductVariantSelectionBuilder, Builder<? extends ProductVariantSelection>> builder) Product Variant Selection after the Add Product update action.Product that was added to the Product Selection.
-
Constructor Details
-
ProductSelectionProductAddedMessagePayloadBuilder
public ProductSelectionProductAddedMessagePayloadBuilder()
-
-
Method Details
-
product
public ProductSelectionProductAddedMessagePayloadBuilder product(Function<ProductReferenceBuilder, ProductReferenceBuilder> builder) Product that was added to the Product Selection.
- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
withProduct
public ProductSelectionProductAddedMessagePayloadBuilder withProduct(Function<ProductReferenceBuilder, ProductReference> builder) Product that was added to the Product Selection.
- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
product
Product that was added to the Product Selection.
- Parameters:
product
- value to be set- Returns:
- Builder
-
variantSelection
public ProductSelectionProductAddedMessagePayloadBuilder variantSelection(ProductVariantSelection variantSelection) Product Variant Selection after the Add Product update action.
- Parameters:
variantSelection
- value to be set- Returns:
- Builder
-
variantSelection
public ProductSelectionProductAddedMessagePayloadBuilder variantSelection(Function<ProductVariantSelectionBuilder, Builder<? extends ProductVariantSelection>> builder) Product Variant Selection after the Add Product update action.
- Parameters:
builder
- function to build the variantSelection value- Returns:
- Builder
-
getProduct
Product that was added to the Product Selection.
- Returns:
- product
-
getVariantSelection
Product Variant Selection after the Add Product update action.
- Returns:
- variantSelection
-
build
builds ProductSelectionProductAddedMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSelectionProductAddedMessagePayload>
- Returns:
- ProductSelectionProductAddedMessagePayload
-
buildUnchecked
builds ProductSelectionProductAddedMessagePayload without checking for non-null required values- Returns:
- ProductSelectionProductAddedMessagePayload
-
of
factory method for an instance of ProductSelectionProductAddedMessagePayloadBuilder- Returns:
- builder
-
of
public static ProductSelectionProductAddedMessagePayloadBuilder of(ProductSelectionProductAddedMessagePayload template) create builder for ProductSelectionProductAddedMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-