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