Class RuleApproverBuilder
java.lang.Object
com.commercetools.api.models.approval_rule.RuleApproverBuilder
- All Implemented Interfaces:
Builder<RuleApprover>
RuleApproverBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
RuleApprover ruleApprover = RuleApprover.builder()
.associateRole(associateRoleBuilder -> associateRoleBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassociateRole
(AssociateRoleKeyReference associateRole) The Associate Role that is allowed to approve at a given stage in the approval process.The Associate Role that is allowed to approve at a given stage in the approval process.build()
builds RuleApprover with checking for non-null required valuesbuilds RuleApprover without checking for non-null required valuesThe Associate Role that is allowed to approve at a given stage in the approval process.static RuleApproverBuilder
of()
factory method for an instance of RuleApproverBuilderstatic RuleApproverBuilder
of
(RuleApprover template) create builder for RuleApprover instanceThe Associate Role that is allowed to approve at a given stage in the approval process.
-
Constructor Details
-
RuleApproverBuilder
public RuleApproverBuilder()
-
-
Method Details
-
associateRole
public RuleApproverBuilder associateRole(Function<AssociateRoleKeyReferenceBuilder, AssociateRoleKeyReferenceBuilder> builder) The Associate Role that is allowed to approve at a given stage in the approval process.
- Parameters:
builder
- function to build the associateRole value- Returns:
- Builder
-
withAssociateRole
public RuleApproverBuilder withAssociateRole(Function<AssociateRoleKeyReferenceBuilder, AssociateRoleKeyReference> builder) The Associate Role that is allowed to approve at a given stage in the approval process.
- Parameters:
builder
- function to build the associateRole value- Returns:
- Builder
-
associateRole
The Associate Role that is allowed to approve at a given stage in the approval process.
- Parameters:
associateRole
- value to be set- Returns:
- Builder
-
getAssociateRole
The Associate Role that is allowed to approve at a given stage in the approval process.
- Returns:
- associateRole
-
build
builds RuleApprover with checking for non-null required values- Specified by:
build
in interfaceBuilder<RuleApprover>
- Returns:
- RuleApprover
-
buildUnchecked
builds RuleApprover without checking for non-null required values- Returns:
- RuleApprover
-
of
factory method for an instance of RuleApproverBuilder- Returns:
- builder
-
of
create builder for RuleApprover instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-