Class ProductSelectionVariantSelectionChangedMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.ProductSelectionVariantSelectionChangedMessagePayloadBuilder
- All Implemented Interfaces:
Builder<ProductSelectionVariantSelectionChangedMessagePayload>
public class ProductSelectionVariantSelectionChangedMessagePayloadBuilder
extends Object
implements Builder<ProductSelectionVariantSelectionChangedMessagePayload>
ProductSelectionVariantSelectionChangedMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductSelectionVariantSelectionChangedMessagePayload productSelectionVariantSelectionChangedMessagePayload = ProductSelectionVariantSelectionChangedMessagePayload.builder()
.product(productBuilder -> productBuilder)
.oldVariantSelection(oldVariantSelectionBuilder -> oldVariantSelectionBuilder)
.newVariantSelection(newVariantSelectionBuilder -> newVariantSelectionBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductSelectionVariantSelectionChangedMessagePayload with checking for non-null required valuesbuilds ProductSelectionVariantSelectionChangedMessagePayload without checking for non-null required valuesProduct Variant Selection after the Set Variant Selection update action.Product Variant Selection before the Set Variant Selection update action.Product for which the Product Variant Selection changed.newVariantSelection
(ProductVariantSelection newVariantSelection) Product Variant Selection after the Set Variant Selection update action.newVariantSelection
(Function<ProductVariantSelectionBuilder, Builder<? extends ProductVariantSelection>> builder) Product Variant Selection after the Set Variant Selection update action.of()
factory method for an instance of ProductSelectionVariantSelectionChangedMessagePayloadBuildercreate builder for ProductSelectionVariantSelectionChangedMessagePayload instanceoldVariantSelection
(ProductVariantSelection oldVariantSelection) Product Variant Selection before the Set Variant Selection update action.oldVariantSelection
(Function<ProductVariantSelectionBuilder, Builder<? extends ProductVariantSelection>> builder) Product Variant Selection before the Set Variant Selection update action.product
(ProductReference product) Product for which the Product Variant Selection changed.Product for which the Product Variant Selection changed.Product for which the Product Variant Selection changed.
-
Constructor Details
-
ProductSelectionVariantSelectionChangedMessagePayloadBuilder
public ProductSelectionVariantSelectionChangedMessagePayloadBuilder()
-
-
Method Details
-
product
public ProductSelectionVariantSelectionChangedMessagePayloadBuilder product(Function<ProductReferenceBuilder, ProductReferenceBuilder> builder) Product for which the Product Variant Selection changed.
- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
withProduct
public ProductSelectionVariantSelectionChangedMessagePayloadBuilder withProduct(Function<ProductReferenceBuilder, ProductReference> builder) Product for which the Product Variant Selection changed.
- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
product
public ProductSelectionVariantSelectionChangedMessagePayloadBuilder product(ProductReference product) Product for which the Product Variant Selection changed.
- Parameters:
product
- value to be set- Returns:
- Builder
-
oldVariantSelection
public ProductSelectionVariantSelectionChangedMessagePayloadBuilder oldVariantSelection(ProductVariantSelection oldVariantSelection) Product Variant Selection before the Set Variant Selection update action.
- Parameters:
oldVariantSelection
- value to be set- Returns:
- Builder
-
oldVariantSelection
public ProductSelectionVariantSelectionChangedMessagePayloadBuilder oldVariantSelection(Function<ProductVariantSelectionBuilder, Builder<? extends ProductVariantSelection>> builder) Product Variant Selection before the Set Variant Selection update action.
- Parameters:
builder
- function to build the oldVariantSelection value- Returns:
- Builder
-
newVariantSelection
public ProductSelectionVariantSelectionChangedMessagePayloadBuilder newVariantSelection(ProductVariantSelection newVariantSelection) Product Variant Selection after the Set Variant Selection update action.
- Parameters:
newVariantSelection
- value to be set- Returns:
- Builder
-
newVariantSelection
public ProductSelectionVariantSelectionChangedMessagePayloadBuilder newVariantSelection(Function<ProductVariantSelectionBuilder, Builder<? extends ProductVariantSelection>> builder) Product Variant Selection after the Set Variant Selection update action.
- Parameters:
builder
- function to build the newVariantSelection value- Returns:
- Builder
-
getProduct
Product for which the Product Variant Selection changed.
- Returns:
- product
-
getOldVariantSelection
Product Variant Selection before the Set Variant Selection update action.
- Returns:
- oldVariantSelection
-
getNewVariantSelection
Product Variant Selection after the Set Variant Selection update action.
- Returns:
- newVariantSelection
-
build
builds ProductSelectionVariantSelectionChangedMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSelectionVariantSelectionChangedMessagePayload>
- Returns:
- ProductSelectionVariantSelectionChangedMessagePayload
-
buildUnchecked
builds ProductSelectionVariantSelectionChangedMessagePayload without checking for non-null required values- Returns:
- ProductSelectionVariantSelectionChangedMessagePayload
-
of
factory method for an instance of ProductSelectionVariantSelectionChangedMessagePayloadBuilder- Returns:
- builder
-
of
public static ProductSelectionVariantSelectionChangedMessagePayloadBuilder of(ProductSelectionVariantSelectionChangedMessagePayload template) create builder for ProductSelectionVariantSelectionChangedMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-