Class AssociateDraftBuilder
java.lang.Object
com.commercetools.api.models.business_unit.AssociateDraftBuilder
- All Implemented Interfaces:
Builder<AssociateDraft>
AssociateDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AssociateDraft associateDraft = AssociateDraft.builder()
.plusAssociateRoleAssignments(associateRoleAssignmentsBuilder -> associateRoleAssignmentsBuilder)
.customer(customerBuilder -> customerBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAssociateRoleAssignments
(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraft> builder) Roles assigned to the Associate within a Business Unit.associateRoleAssignments
(AssociateRoleAssignmentDraft... associateRoleAssignments) Roles assigned to the Associate within a Business Unit.associateRoleAssignments
(List<AssociateRoleAssignmentDraft> associateRoleAssignments) Roles assigned to the Associate within a Business Unit.build()
builds AssociateDraft with checking for non-null required valuesbuilds AssociateDraft without checking for non-null required valuescustomer
(CustomerResourceIdentifier customer) The Customer to be part of the Business Unit.The Customer to be part of the Business Unit.Roles assigned to the Associate within a Business Unit.The Customer to be part of the Business Unit.static AssociateDraftBuilder
of()
factory method for an instance of AssociateDraftBuilderstatic AssociateDraftBuilder
of
(AssociateDraft template) create builder for AssociateDraft instanceplusAssociateRoleAssignments
(AssociateRoleAssignmentDraft... associateRoleAssignments) Roles assigned to the Associate within a Business Unit.plusAssociateRoleAssignments
(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraftBuilder> builder) Roles assigned to the Associate within a Business Unit.setAssociateRoleAssignments
(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraft> builder) Roles assigned to the Associate within a Business Unit.withAssociateRoleAssignments
(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraftBuilder> builder) Roles assigned to the Associate within a Business Unit.The Customer to be part of the Business Unit.
-
Constructor Details
-
AssociateDraftBuilder
public AssociateDraftBuilder()
-
-
Method Details
-
associateRoleAssignments
public AssociateDraftBuilder associateRoleAssignments(AssociateRoleAssignmentDraft... associateRoleAssignments) Roles assigned to the Associate within a Business Unit.
- Parameters:
associateRoleAssignments
- value to be set- Returns:
- Builder
-
associateRoleAssignments
public AssociateDraftBuilder associateRoleAssignments(List<AssociateRoleAssignmentDraft> associateRoleAssignments) Roles assigned to the Associate within a Business Unit.
- Parameters:
associateRoleAssignments
- value to be set- Returns:
- Builder
-
plusAssociateRoleAssignments
public AssociateDraftBuilder plusAssociateRoleAssignments(AssociateRoleAssignmentDraft... associateRoleAssignments) Roles assigned to the Associate within a Business Unit.
- Parameters:
associateRoleAssignments
- value to be set- Returns:
- Builder
-
plusAssociateRoleAssignments
public AssociateDraftBuilder plusAssociateRoleAssignments(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraftBuilder> builder) Roles assigned to the Associate within a Business Unit.
- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
withAssociateRoleAssignments
public AssociateDraftBuilder withAssociateRoleAssignments(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraftBuilder> builder) Roles assigned to the Associate within a Business Unit.
- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
addAssociateRoleAssignments
public AssociateDraftBuilder addAssociateRoleAssignments(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraft> builder) Roles assigned to the Associate within a Business Unit.
- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
setAssociateRoleAssignments
public AssociateDraftBuilder setAssociateRoleAssignments(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraft> builder) Roles assigned to the Associate within a Business Unit.
- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
customer
public AssociateDraftBuilder customer(Function<CustomerResourceIdentifierBuilder, CustomerResourceIdentifierBuilder> builder) The Customer to be part of the Business Unit.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
withCustomer
public AssociateDraftBuilder withCustomer(Function<CustomerResourceIdentifierBuilder, CustomerResourceIdentifier> builder) The Customer to be part of the Business Unit.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
customer
The Customer to be part of the Business Unit.
- Parameters:
customer
- value to be set- Returns:
- Builder
-
getAssociateRoleAssignments
Roles assigned to the Associate within a Business Unit.
- Returns:
- associateRoleAssignments
-
getCustomer
The Customer to be part of the Business Unit.
- Returns:
- customer
-
build
builds AssociateDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<AssociateDraft>
- Returns:
- AssociateDraft
-
buildUnchecked
builds AssociateDraft without checking for non-null required values- Returns:
- AssociateDraft
-
of
factory method for an instance of AssociateDraftBuilder- Returns:
- builder
-
of
create builder for AssociateDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-