Package com.commercetools.api.models.me
Class MyShoppingListUpdateBuilder
java.lang.Object
com.commercetools.api.models.me.MyShoppingListUpdateBuilder
- All Implemented Interfaces:
Builder<MyShoppingListUpdate>
MyShoppingListUpdateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
MyShoppingListUpdate myShoppingListUpdate = MyShoppingListUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactions
(MyShoppingListUpdateAction... actions) List of update actions to be performed on the ShoppingList.actions
(List<MyShoppingListUpdateAction> actions) List of update actions to be performed on the ShoppingList.build()
builds MyShoppingListUpdate with checking for non-null required valuesbuilds MyShoppingListUpdate without checking for non-null required valuesList of update actions to be performed on the ShoppingList.Expected version of the ShoppingList on which the changes should be applied.static MyShoppingListUpdateBuilder
of()
factory method for an instance of MyShoppingListUpdateBuilderstatic MyShoppingListUpdateBuilder
of
(MyShoppingListUpdate template) create builder for MyShoppingListUpdate instanceplusActions
(MyShoppingListUpdateAction... actions) List of update actions to be performed on the ShoppingList.plusActions
(Function<MyShoppingListUpdateActionBuilder, Builder<? extends MyShoppingListUpdateAction>> builder) List of update actions to be performed on the ShoppingList.Expected version of the ShoppingList on which the changes should be applied.withActions
(Function<MyShoppingListUpdateActionBuilder, Builder<? extends MyShoppingListUpdateAction>> builder) List of update actions to be performed on the ShoppingList.
-
Constructor Details
-
MyShoppingListUpdateBuilder
public MyShoppingListUpdateBuilder()
-
-
Method Details
-
version
Expected version of the ShoppingList 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
List of update actions to be performed on the ShoppingList.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
actions
List of update actions to be performed on the ShoppingList.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
List of update actions to be performed on the ShoppingList.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
public MyShoppingListUpdateBuilder plusActions(Function<MyShoppingListUpdateActionBuilder, Builder<? extends MyShoppingListUpdateAction>> builder) List of update actions to be performed on the ShoppingList.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
withActions
public MyShoppingListUpdateBuilder withActions(Function<MyShoppingListUpdateActionBuilder, Builder<? extends MyShoppingListUpdateAction>> builder) List of update actions to be performed on the ShoppingList.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
getVersion
Expected version of the ShoppingList 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
List of update actions to be performed on the ShoppingList.
- Returns:
- actions
-
build
builds MyShoppingListUpdate with checking for non-null required values- Specified by:
build
in interfaceBuilder<MyShoppingListUpdate>
- Returns:
- MyShoppingListUpdate
-
buildUnchecked
builds MyShoppingListUpdate without checking for non-null required values- Returns:
- MyShoppingListUpdate
-
of
factory method for an instance of MyShoppingListUpdateBuilder- Returns:
- builder
-
of
create builder for MyShoppingListUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-