Class AssociateRoleAssignmentBuilder
java.lang.Object
com.commercetools.history.models.common.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassociateRole(KeyReference associateRole) set the value to the associateRoleset the value to the associateRole using the builder functionbuild()builds AssociateRoleAssignment with checking for non-null required valuesbuilds AssociateRoleAssignment without checking for non-null required valuesvalue of associateRole}Determines whether an AssociateRoleAssignment can be inherited by child Business Units.inheritance(AssociateRoleInheritanceMode inheritance) Determines whether an AssociateRoleAssignment can be inherited by child Business Units.of()factory method for an instance of AssociateRoleAssignmentBuilderof(AssociateRoleAssignment template) create builder for AssociateRoleAssignment instanceset the value to the associateRole using the builder function
-
Constructor Details
-
AssociateRoleAssignmentBuilder
public AssociateRoleAssignmentBuilder()
-
-
Method Details
-
associateRole
public AssociateRoleAssignmentBuilder associateRole(Function<KeyReferenceBuilder, KeyReferenceBuilder> builder) set the value to the associateRole using the builder function- Parameters:
builder- function to build the associateRole value- Returns:
- Builder
-
withAssociateRole
public AssociateRoleAssignmentBuilder withAssociateRole(Function<KeyReferenceBuilder, KeyReference> builder) set the value to the associateRole using the builder function- Parameters:
builder- function to build the associateRole value- Returns:
- Builder
-
associateRole
set the value to the associateRole- Parameters:
associateRole- value to be set- Returns:
- Builder
-
inheritance
Determines whether an AssociateRoleAssignment can be inherited by child Business Units.
- Parameters:
inheritance- value to be set- Returns:
- Builder
-
getAssociateRole
value of associateRole}- Returns:
- associateRole
-
getInheritance
Determines whether an AssociateRoleAssignment can be inherited by child Business Units.
- Returns:
- inheritance
-
build
builds AssociateRoleAssignment with checking for non-null required values- Specified by:
buildin 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
-