Class ApproverHierarchyDraftBuilder
java.lang.Object
com.commercetools.api.models.approval_rule.ApproverHierarchyDraftBuilder
- All Implemented Interfaces:
Builder<ApproverHierarchyDraft>
public class ApproverHierarchyDraftBuilder
extends Object
implements Builder<ApproverHierarchyDraft>
ApproverHierarchyDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ApproverHierarchyDraft approverHierarchyDraft = ApproverHierarchyDraft.builder()
.plusTiers(tiersBuilder -> tiersBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionNested conjunctions representing tiers of approvers in a hierarchy.build()
builds ApproverHierarchyDraft with checking for non-null required valuesbuilds ApproverHierarchyDraft without checking for non-null required valuesgetTiers()
Nested conjunctions representing tiers of approvers in a hierarchy.of()
factory method for an instance of ApproverHierarchyDraftBuilderof
(ApproverHierarchyDraft template) create builder for ApproverHierarchyDraft instanceplusTiers
(ApproverConjunctionDraft... tiers) Nested conjunctions representing tiers of approvers in a hierarchy.Nested conjunctions representing tiers of approvers in a hierarchy.Nested conjunctions representing tiers of approvers in a hierarchy.tiers
(ApproverConjunctionDraft... tiers) Nested conjunctions representing tiers of approvers in a hierarchy.tiers
(List<ApproverConjunctionDraft> tiers) Nested conjunctions representing tiers of approvers in a hierarchy.Nested conjunctions representing tiers of approvers in a hierarchy.
-
Constructor Details
-
ApproverHierarchyDraftBuilder
public ApproverHierarchyDraftBuilder()
-
-
Method Details
-
tiers
Nested conjunctions representing tiers of approvers in a hierarchy.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
tiers
Nested conjunctions representing tiers of approvers in a hierarchy.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
Nested conjunctions representing tiers of approvers in a hierarchy.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
public ApproverHierarchyDraftBuilder plusTiers(Function<ApproverConjunctionDraftBuilder, ApproverConjunctionDraftBuilder> builder) Nested conjunctions representing tiers of approvers in a hierarchy.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
withTiers
public ApproverHierarchyDraftBuilder withTiers(Function<ApproverConjunctionDraftBuilder, ApproverConjunctionDraftBuilder> builder) Nested conjunctions representing tiers of approvers in a hierarchy.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
addTiers
public ApproverHierarchyDraftBuilder addTiers(Function<ApproverConjunctionDraftBuilder, ApproverConjunctionDraft> builder) Nested conjunctions representing tiers of approvers in a hierarchy.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
setTiers
public ApproverHierarchyDraftBuilder setTiers(Function<ApproverConjunctionDraftBuilder, ApproverConjunctionDraft> builder) Nested conjunctions representing tiers of approvers in a hierarchy.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
getTiers
Nested conjunctions representing tiers of approvers in a hierarchy.
- Returns:
- tiers
-
build
builds ApproverHierarchyDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<ApproverHierarchyDraft>
- Returns:
- ApproverHierarchyDraft
-
buildUnchecked
builds ApproverHierarchyDraft without checking for non-null required values- Returns:
- ApproverHierarchyDraft
-
of
factory method for an instance of ApproverHierarchyDraftBuilder- Returns:
- builder
-
of
create builder for ApproverHierarchyDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-