Class ProductTypeUpdateBuilder
java.lang.Object
com.commercetools.api.models.product_type.ProductTypeUpdateBuilder
- All Implemented Interfaces:
Builder<ProductTypeUpdate>
ProductTypeUpdateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductTypeUpdate productTypeUpdate = ProductTypeUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactions
(ProductTypeUpdateAction... actions) Update actions to be performed on the ProductType.actions
(List<ProductTypeUpdateAction> actions) Update actions to be performed on the ProductType.build()
builds ProductTypeUpdate with checking for non-null required valuesbuilds ProductTypeUpdate without checking for non-null required valuesUpdate actions to be performed on the ProductType.Expected version of the ProductType on which the changes should be applied.static ProductTypeUpdateBuilder
of()
factory method for an instance of ProductTypeUpdateBuilderstatic ProductTypeUpdateBuilder
of
(ProductTypeUpdate template) create builder for ProductTypeUpdate instanceplusActions
(ProductTypeUpdateAction... actions) Update actions to be performed on the ProductType.plusActions
(Function<ProductTypeUpdateActionBuilder, Builder<? extends ProductTypeUpdateAction>> builder) Update actions to be performed on the ProductType.Expected version of the ProductType on which the changes should be applied.withActions
(Function<ProductTypeUpdateActionBuilder, Builder<? extends ProductTypeUpdateAction>> builder) Update actions to be performed on the ProductType.
-
Constructor Details
-
ProductTypeUpdateBuilder
public ProductTypeUpdateBuilder()
-
-
Method Details
-
version
Expected version of the ProductType on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.
- Parameters:
version
- value to be set- Returns:
- Builder
-
actions
Update actions to be performed on the ProductType.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
actions
Update actions to be performed on the ProductType.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
Update actions to be performed on the ProductType.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
public ProductTypeUpdateBuilder plusActions(Function<ProductTypeUpdateActionBuilder, Builder<? extends ProductTypeUpdateAction>> builder) Update actions to be performed on the ProductType.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
withActions
public ProductTypeUpdateBuilder withActions(Function<ProductTypeUpdateActionBuilder, Builder<? extends ProductTypeUpdateAction>> builder) Update actions to be performed on the ProductType.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
getVersion
Expected version of the ProductType on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.
- Returns:
- version
-
getActions
Update actions to be performed on the ProductType.
- Returns:
- actions
-
build
builds ProductTypeUpdate with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductTypeUpdate>
- Returns:
- ProductTypeUpdate
-
buildUnchecked
builds ProductTypeUpdate without checking for non-null required values- Returns:
- ProductTypeUpdate
-
of
factory method for an instance of ProductTypeUpdateBuilder- Returns:
- builder
-
of
create builder for ProductTypeUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-