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