Class AssociateRoleDraftBuilder
java.lang.Object
com.commercetools.api.models.associate_role.AssociateRoleDraftBuilder
- All Implemented Interfaces:
Builder<AssociateRoleDraft>
AssociateRoleDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AssociateRoleDraft associateRoleDraft = AssociateRoleDraft.builder()
.key("{key}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds AssociateRoleDraft with checking for non-null required valuesbuilds AssociateRoleDraft without checking for non-null required valuesbuyerAssignable
(Boolean buyerAssignable) Whether the AssociateRole can be assigned to an Associate by a buyer.custom
(CustomFieldsDraft custom) Custom Fields for the AssociateRole.Custom Fields for the AssociateRole.Whether the AssociateRole can be assigned to an Associate by a buyer.Custom Fields for the AssociateRole.getKey()
User-defined unique and immutable identifier for the AssociateRole.getName()
Name of the AssociateRole.List of Permissions for the AssociateRole.User-defined unique and immutable identifier for the AssociateRole.Name of the AssociateRole.static AssociateRoleDraftBuilder
of()
factory method for an instance of AssociateRoleDraftBuilderstatic AssociateRoleDraftBuilder
of
(AssociateRoleDraft template) create builder for AssociateRoleDraft instancepermissions
(Permission... permissions) List of Permissions for the AssociateRole.permissions
(List<Permission> permissions) List of Permissions for the AssociateRole.plusPermissions
(Permission... permissions) List of Permissions for the AssociateRole.Custom Fields for the AssociateRole.
-
Constructor Details
-
AssociateRoleDraftBuilder
public AssociateRoleDraftBuilder()
-
-
Method Details
-
key
User-defined unique and immutable identifier for the AssociateRole.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
Name of the AssociateRole.
- Parameters:
name
- value to be set- Returns:
- Builder
-
buyerAssignable
Whether the AssociateRole can be assigned to an Associate by a buyer.
- Parameters:
buyerAssignable
- value to be set- Returns:
- Builder
-
permissions
List of Permissions for the AssociateRole.
- Parameters:
permissions
- value to be set- Returns:
- Builder
-
permissions
List of Permissions for the AssociateRole.
- Parameters:
permissions
- value to be set- Returns:
- Builder
-
plusPermissions
List of Permissions for the AssociateRole.
- Parameters:
permissions
- value to be set- Returns:
- Builder
-
custom
public AssociateRoleDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the AssociateRole.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public AssociateRoleDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the AssociateRole.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the AssociateRole.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getKey
User-defined unique and immutable identifier for the AssociateRole.
- Returns:
- key
-
getName
Name of the AssociateRole.
- Returns:
- name
-
getBuyerAssignable
Whether the AssociateRole can be assigned to an Associate by a buyer.
- Returns:
- buyerAssignable
-
getPermissions
List of Permissions for the AssociateRole.
- Returns:
- permissions
-
getCustom
Custom Fields for the AssociateRole.
- Returns:
- custom
-
build
builds AssociateRoleDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<AssociateRoleDraft>
- Returns:
- AssociateRoleDraft
-
buildUnchecked
builds AssociateRoleDraft without checking for non-null required values- Returns:
- AssociateRoleDraft
-
of
factory method for an instance of AssociateRoleDraftBuilder- Returns:
- builder
-
of
create builder for AssociateRoleDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-