Class RuleRequesterBuilder
java.lang.Object
com.commercetools.api.models.approval_rule.RuleRequesterBuilder
- All Implemented Interfaces:
Builder<RuleRequester>
RuleRequesterBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
RuleRequester ruleRequester = RuleRequester.builder()
.associateRole(associateRoleBuilder -> associateRoleBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassociateRole
(AssociateRoleKeyReference associateRole) The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.build()
builds RuleRequester with checking for non-null required valuesbuilds RuleRequester without checking for non-null required valuesThe Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.static RuleRequesterBuilder
of()
factory method for an instance of RuleRequesterBuilderstatic RuleRequesterBuilder
of
(RuleRequester template) create builder for RuleRequester instanceThe Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.
-
Constructor Details
-
RuleRequesterBuilder
public RuleRequesterBuilder()
-
-
Method Details
-
associateRole
public RuleRequesterBuilder associateRole(Function<AssociateRoleKeyReferenceBuilder, AssociateRoleKeyReferenceBuilder> builder) The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.
- Parameters:
builder
- function to build the associateRole value- Returns:
- Builder
-
withAssociateRole
public RuleRequesterBuilder withAssociateRole(Function<AssociateRoleKeyReferenceBuilder, AssociateRoleKeyReference> builder) The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.
- Parameters:
builder
- function to build the associateRole value- Returns:
- Builder
-
associateRole
The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.
- Parameters:
associateRole
- value to be set- Returns:
- Builder
-
getAssociateRole
The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.
- Returns:
- associateRole
-
build
builds RuleRequester with checking for non-null required values- Specified by:
build
in interfaceBuilder<RuleRequester>
- Returns:
- RuleRequester
-
buildUnchecked
builds RuleRequester without checking for non-null required values- Returns:
- RuleRequester
-
of
factory method for an instance of RuleRequesterBuilder- Returns:
- builder
-
of
create builder for RuleRequester instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-