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