Class AddProductChangeBuilder
java.lang.Object
com.commercetools.history.models.change.AddProductChangeBuilder
- All Implemented Interfaces:
Builder<AddProductChange>
AddProductChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AddProductChange addProductChange = AddProductChange.builder()
.change("{change}")
.nextValue(nextValueBuilder -> nextValueBuilder)
.variantSelection(variantSelectionBuilder -> variantSelectionBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds AddProductChange with checking for non-null required valuesbuilds AddProductChange without checking for non-null required valuesset the value to the changevalue of change}Value after the change.The Product Variants included in the Product Selection.Value after the change.nextValue
(Function<ReferenceBuilder, ReferenceBuilder> builder) Value after the change.static AddProductChangeBuilder
of()
factory method for an instance of AddProductChangeBuilderstatic AddProductChangeBuilder
of
(AddProductChange template) create builder for AddProductChange instancevariantSelection
(ProductVariantSelection variantSelection) The Product Variants included in the Product Selection.The Product Variants included in the Product Selection.withNextValue
(Function<ReferenceBuilder, Reference> builder) Value after the change.The Product Variants included in the Product Selection.
-
Constructor Details
-
AddProductChangeBuilder
public AddProductChangeBuilder()
-
-
Method Details
-
change
set the value to the change- Parameters:
change
- value to be set- Returns:
- Builder
-
nextValue
Value after the change.
- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
withNextValue
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
-
variantSelection
public AddProductChangeBuilder variantSelection(Function<ProductVariantSelectionBuilder, ProductVariantSelectionBuilder> builder) The Product Variants included in the Product Selection.
- Parameters:
builder
- function to build the variantSelection value- Returns:
- Builder
-
withVariantSelection
public AddProductChangeBuilder withVariantSelection(Function<ProductVariantSelectionBuilder, ProductVariantSelection> builder) The Product Variants included in the Product Selection.
- Parameters:
builder
- function to build the variantSelection value- Returns:
- Builder
-
variantSelection
The Product Variants included in the Product Selection.
- Parameters:
variantSelection
- value to be set- Returns:
- Builder
-
getChange
value of change}- Returns:
- change
-
getNextValue
Value after the change.
- Returns:
- nextValue
-
getVariantSelection
The Product Variants included in the Product Selection.
- Returns:
- variantSelection
-
build
builds AddProductChange with checking for non-null required values- Specified by:
build
in interfaceBuilder<AddProductChange>
- Returns:
- AddProductChange
-
buildUnchecked
builds AddProductChange without checking for non-null required values- Returns:
- AddProductChange
-
of
factory method for an instance of AddProductChangeBuilder- Returns:
- builder
-
of
create builder for AddProductChange instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-