Class AssociateDraftBuilder
java.lang.Object
com.commercetools.importapi.models.business_units.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()
.customer(customerBuilder -> customerBuilder)
.plusAssociateRoleAssignments(associateRoleAssignmentsBuilder -> associateRoleAssignmentsBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAssociateRoleAssignments
(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraft> builder) The roles to assign to the Associate.associateRoleAssignments
(AssociateRoleAssignmentDraft... associateRoleAssignments) The roles to assign to the Associate.associateRoleAssignments
(List<AssociateRoleAssignmentDraft> associateRoleAssignments) The roles to assign to the Associate.build()
builds AssociateDraft with checking for non-null required valuesbuilds AssociateDraft without checking for non-null required valuescustomer
(CustomerKeyReference customer) The Customer to be part of the Business Unit.The Customer to be part of the Business Unit.The roles to assign to the Associate.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) The roles to assign to the Associate.plusAssociateRoleAssignments
(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraftBuilder> builder) The roles to assign to the Associate.setAssociateRoleAssignments
(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraft> builder) The roles to assign to the Associate.withAssociateRoleAssignments
(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraftBuilder> builder) The roles to assign to the Associate.The Customer to be part of the Business Unit.
-
Constructor Details
-
AssociateDraftBuilder
public AssociateDraftBuilder()
-
-
Method Details
-
customer
public AssociateDraftBuilder customer(Function<CustomerKeyReferenceBuilder, CustomerKeyReferenceBuilder> 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<CustomerKeyReferenceBuilder, CustomerKeyReference> 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
-
associateRoleAssignments
public AssociateDraftBuilder associateRoleAssignments(AssociateRoleAssignmentDraft... associateRoleAssignments) The roles to assign to the Associate.
- Parameters:
associateRoleAssignments
- value to be set- Returns:
- Builder
-
associateRoleAssignments
public AssociateDraftBuilder associateRoleAssignments(List<AssociateRoleAssignmentDraft> associateRoleAssignments) The roles to assign to the Associate.
- Parameters:
associateRoleAssignments
- value to be set- Returns:
- Builder
-
plusAssociateRoleAssignments
public AssociateDraftBuilder plusAssociateRoleAssignments(AssociateRoleAssignmentDraft... associateRoleAssignments) The roles to assign to the Associate.
- Parameters:
associateRoleAssignments
- value to be set- Returns:
- Builder
-
plusAssociateRoleAssignments
public AssociateDraftBuilder plusAssociateRoleAssignments(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraftBuilder> builder) The roles to assign to the Associate.
- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
withAssociateRoleAssignments
public AssociateDraftBuilder withAssociateRoleAssignments(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraftBuilder> builder) The roles to assign to the Associate.
- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
addAssociateRoleAssignments
public AssociateDraftBuilder addAssociateRoleAssignments(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraft> builder) The roles to assign to the Associate.
- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
setAssociateRoleAssignments
public AssociateDraftBuilder setAssociateRoleAssignments(Function<AssociateRoleAssignmentDraftBuilder, AssociateRoleAssignmentDraft> builder) The roles to assign to the Associate.
- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
getCustomer
The Customer to be part of the Business Unit.
- Returns:
- customer
-
getAssociateRoleAssignments
The roles to assign to the Associate.
- Returns:
- associateRoleAssignments
-
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
-