Class SetVariantSelectionChangeBuilder
java.lang.Object
com.commercetools.history.models.change.SetVariantSelectionChangeBuilder
- All Implemented Interfaces:
Builder<SetVariantSelectionChange>
public class SetVariantSelectionChangeBuilder
extends Object
implements Builder<SetVariantSelectionChange>
SetVariantSelectionChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
SetVariantSelectionChange setVariantSelectionChange = SetVariantSelectionChange.builder()
.change("{change}")
.previousValue(previousValueBuilder -> previousValueBuilder)
.nextValue(nextValueBuilder -> nextValueBuilder)
.product(productBuilder -> productBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds SetVariantSelectionChange with checking for non-null required valuesbuilds SetVariantSelectionChange without checking for non-null required valuesset the value to the changevalue of change}Value after the change.Value before the change.Reference to the updated Product.nextValue(ProductVariantSelection nextValue) Value after the change.Value after the change.of()factory method for an instance of SetVariantSelectionChangeBuilderof(SetVariantSelectionChange template) create builder for SetVariantSelectionChange instancepreviousValue(ProductVariantSelection previousValue) Value before the change.Value before the change.Reference to the updated Product.product(Function<ReferenceBuilder, ReferenceBuilder> builder) Reference to the updated Product.Value after the change.Value before the change.withProduct(Function<ReferenceBuilder, Reference> builder) Reference to the updated Product.
-
Constructor Details
-
SetVariantSelectionChangeBuilder
public SetVariantSelectionChangeBuilder()
-
-
Method Details
-
change
set the value to the change- Parameters:
change- value to be set- Returns:
- Builder
-
previousValue
public SetVariantSelectionChangeBuilder previousValue(Function<ProductVariantSelectionBuilder, ProductVariantSelectionBuilder> builder) Value before the change.
- Parameters:
builder- function to build the previousValue value- Returns:
- Builder
-
withPreviousValue
public SetVariantSelectionChangeBuilder withPreviousValue(Function<ProductVariantSelectionBuilder, ProductVariantSelection> builder) Value before the change.
- Parameters:
builder- function to build the previousValue value- Returns:
- Builder
-
previousValue
Value before the change.
- Parameters:
previousValue- value to be set- Returns:
- Builder
-
nextValue
public SetVariantSelectionChangeBuilder nextValue(Function<ProductVariantSelectionBuilder, ProductVariantSelectionBuilder> builder) Value after the change.
- Parameters:
builder- function to build the nextValue value- Returns:
- Builder
-
withNextValue
public SetVariantSelectionChangeBuilder withNextValue(Function<ProductVariantSelectionBuilder, ProductVariantSelection> builder) Value after the change.
- Parameters:
builder- function to build the nextValue value- Returns:
- Builder
-
nextValue
Value after the change.
- Parameters:
nextValue- value to be set- Returns:
- Builder
-
product
public SetVariantSelectionChangeBuilder product(Function<ReferenceBuilder, ReferenceBuilder> builder) Reference to the updated Product.
- Parameters:
builder- function to build the product value- Returns:
- Builder
-
withProduct
Reference to the updated Product.
- Parameters:
builder- function to build the product value- Returns:
- Builder
-
product
Reference to the updated Product.
- Parameters:
product- value to be set- Returns:
- Builder
-
getChange
value of change}- Returns:
- change
-
getPreviousValue
Value before the change.
- Returns:
- previousValue
-
getNextValue
Value after the change.
- Returns:
- nextValue
-
getProduct
Reference to the updated Product.
- Returns:
- product
-
build
builds SetVariantSelectionChange with checking for non-null required values- Specified by:
buildin interfaceBuilder<SetVariantSelectionChange>- Returns:
- SetVariantSelectionChange
-
buildUnchecked
builds SetVariantSelectionChange without checking for non-null required values- Returns:
- SetVariantSelectionChange
-
of
factory method for an instance of SetVariantSelectionChangeBuilder- Returns:
- builder
-
of
create builder for SetVariantSelectionChange instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-