Class AssociateRoleAssignmentBuilder
java.lang.Object
com.commercetools.api.models.business_unit.AssociateRoleAssignmentBuilder
- All Implemented Interfaces:
Builder<AssociateRoleAssignment>
public class AssociateRoleAssignmentBuilder
extends Object
implements Builder<AssociateRoleAssignment>
AssociateRoleAssignmentBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AssociateRoleAssignment associateRoleAssignment = AssociateRoleAssignment.builder()
.associateRole(associateRoleBuilder -> associateRoleBuilder)
.inheritance(AssociateRoleInheritanceMode.ENABLED)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassociateRole
(AssociateRoleKeyReference associateRole) Role the Associate holds within a Business Unit.Role the Associate holds within a Business Unit.build()
builds AssociateRoleAssignment with checking for non-null required valuesbuilds AssociateRoleAssignment without checking for non-null required valuesRole the Associate holds within a Business Unit.Determines whether the AssociateRoleAssignment can be inherited by child Business Units.inheritance
(AssociateRoleInheritanceMode inheritance) Determines whether the AssociateRoleAssignment can be inherited by child Business Units.of()
factory method for an instance of AssociateRoleAssignmentBuilderof
(AssociateRoleAssignment template) create builder for AssociateRoleAssignment instanceRole the Associate holds within a Business Unit.
-
Constructor Details
-
AssociateRoleAssignmentBuilder
public AssociateRoleAssignmentBuilder()
-
-
Method Details
-
associateRole
public AssociateRoleAssignmentBuilder associateRole(Function<AssociateRoleKeyReferenceBuilder, AssociateRoleKeyReferenceBuilder> builder) Role the Associate holds within a Business Unit.
- Parameters:
builder
- function to build the associateRole value- Returns:
- Builder
-
withAssociateRole
public AssociateRoleAssignmentBuilder withAssociateRole(Function<AssociateRoleKeyReferenceBuilder, AssociateRoleKeyReference> builder) Role the Associate holds within a Business Unit.
- Parameters:
builder
- function to build the associateRole value- Returns:
- Builder
-
associateRole
Role the Associate holds within a Business Unit.
- Parameters:
associateRole
- value to be set- Returns:
- Builder
-
inheritance
Determines whether the AssociateRoleAssignment can be inherited by child Business Units.
- Parameters:
inheritance
- value to be set- Returns:
- Builder
-
getAssociateRole
Role the Associate holds within a Business Unit.
- Returns:
- associateRole
-
getInheritance
Determines whether the AssociateRoleAssignment can be inherited by child Business Units.
- Returns:
- inheritance
-
build
builds AssociateRoleAssignment with checking for non-null required values- Specified by:
build
in interfaceBuilder<AssociateRoleAssignment>
- Returns:
- AssociateRoleAssignment
-
buildUnchecked
builds AssociateRoleAssignment without checking for non-null required values- Returns:
- AssociateRoleAssignment
-
of
factory method for an instance of AssociateRoleAssignmentBuilder- Returns:
- builder
-
of
create builder for AssociateRoleAssignment instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-