Class RuleRequesterDraftBuilder
java.lang.Object
com.commercetools.api.models.approval_rule.RuleRequesterDraftBuilder
- All Implemented Interfaces:
Builder<RuleRequesterDraft>
RuleRequesterDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
RuleRequesterDraft ruleRequesterDraft = RuleRequesterDraft.builder()
.associateRole(associateRoleBuilder -> associateRoleBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassociateRole
(AssociateRoleResourceIdentifier associateRole) The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.associateRole
(Function<AssociateRoleResourceIdentifierBuilder, AssociateRoleResourceIdentifierBuilder> builder) The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.build()
builds RuleRequesterDraft with checking for non-null required valuesbuilds RuleRequesterDraft 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 RuleRequesterDraftBuilder
of()
factory method for an instance of RuleRequesterDraftBuilderstatic RuleRequesterDraftBuilder
of
(RuleRequesterDraft template) create builder for RuleRequesterDraft instancewithAssociateRole
(Function<AssociateRoleResourceIdentifierBuilder, AssociateRoleResourceIdentifier> builder) The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.
-
Constructor Details
-
RuleRequesterDraftBuilder
public RuleRequesterDraftBuilder()
-
-
Method Details
-
associateRole
public RuleRequesterDraftBuilder associateRole(Function<AssociateRoleResourceIdentifierBuilder, AssociateRoleResourceIdentifierBuilder> 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 RuleRequesterDraftBuilder withAssociateRole(Function<AssociateRoleResourceIdentifierBuilder, AssociateRoleResourceIdentifier> 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 RuleRequesterDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<RuleRequesterDraft>
- Returns:
- RuleRequesterDraft
-
buildUnchecked
builds RuleRequesterDraft without checking for non-null required values- Returns:
- RuleRequesterDraft
-
of
factory method for an instance of RuleRequesterDraftBuilder- Returns:
- builder
-
of
create builder for RuleRequesterDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-