Interface AssociateRole
- All Superinterfaces:
BaseResource
,Identifiable<AssociateRole>
- All Known Implementing Classes:
AssociateRoleImpl
Example to create an instance using the builder pattern
AssociateRole associateRole = AssociateRole.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.key("{key}")
.buyerAssignable(true)
.plusPermissions(permissionsBuilder -> permissionsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic AssociateRoleBuilder
builder()
builder factory method for AssociateRolestatic AssociateRoleBuilder
builder
(AssociateRole template) create builder for AssociateRole instancestatic AssociateRole
deepCopy
(AssociateRole template) factory method to create a deep copy of AssociateRole@NotNull Boolean
Whether the AssociateRole can be assigned to an Associate by a buyer.@NotNull ZonedDateTime
Date and time (UTC) the AssociateRole was initially created.@Valid CreatedBy
Present on resources created after 1 February 2019 except for events not tracked.@Valid CustomFields
Custom Fields for the AssociateRole.@NotNull String
getId()
Unique identifier of the AssociateRole.@NotNull String
getKey()
User-defined unique identifier of the AssociateRole.@NotNull ZonedDateTime
Date and time (UTC) the AssociateRole was last updated.@Valid LastModifiedBy
Present on resources updated after 1 February 2019 except for events not tracked.getName()
Name of the AssociateRole.@NotNull List<Permission>
List of Permissions for the AssociateRole.@NotNull Long
Current version of the AssociateRole.static AssociateRole
of()
factory methodstatic AssociateRole
of
(AssociateRole template) factory method to create a shallow copy AssociateRolevoid
setBuyerAssignable
(Boolean buyerAssignable) Whether the AssociateRole can be assigned to an Associate by a buyer.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the AssociateRole was initially created.void
setCreatedBy
(CreatedBy createdBy) Present on resources created after 1 February 2019 except for events not tracked.void
setCustom
(CustomFields custom) Custom Fields for the AssociateRole.void
Unique identifier of the AssociateRole.void
User-defined unique identifier of the AssociateRole.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the AssociateRole was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) Present on resources updated after 1 February 2019 except for events not tracked.void
Name of the AssociateRole.void
setPermissions
(Permission... permissions) List of Permissions for the AssociateRole.void
setPermissions
(List<Permission> permissions) List of Permissions for the AssociateRole.void
setVersion
(Long version) Current version of the AssociateRole.static com.fasterxml.jackson.core.type.TypeReference<AssociateRole>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withAssociateRole
(Function<AssociateRole, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
-
Method Details
-
getId
Unique identifier of the AssociateRole.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceIdentifiable<AssociateRole>
- Returns:
- id
-
getVersion
Current version of the AssociateRole.
- Specified by:
getVersion
in interfaceBaseResource
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the AssociateRole was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the AssociateRole was last updated.
- Specified by:
getLastModifiedAt
in interfaceBaseResource
- Returns:
- lastModifiedAt
-
getLastModifiedBy
Present on resources updated after 1 February 2019 except for events not tracked.
- Returns:
- lastModifiedBy
-
getCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the AssociateRole.
- Returns:
- key
-
getBuyerAssignable
Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned using the general endpoint.
- Returns:
- buyerAssignable
-
getName
String getName()Name of the AssociateRole.
- Returns:
- name
-
getPermissions
List of Permissions for the AssociateRole.
- Returns:
- permissions
-
getCustom
Custom Fields for the AssociateRole.
- Returns:
- custom
-
setId
Unique identifier of the AssociateRole.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the AssociateRole.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the AssociateRole was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the AssociateRole was last updated.
- Specified by:
setLastModifiedAt
in interfaceBaseResource
- Parameters:
lastModifiedAt
- value to be set
-
setLastModifiedBy
Present on resources updated after 1 February 2019 except for events not tracked.
- Parameters:
lastModifiedBy
- value to be set
-
setCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
createdBy
- value to be set
-
setKey
User-defined unique identifier of the AssociateRole.
- Parameters:
key
- value to be set
-
setBuyerAssignable
Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned using the general endpoint.
- Parameters:
buyerAssignable
- value to be set
-
setName
Name of the AssociateRole.
- Parameters:
name
- value to be set
-
setPermissions
List of Permissions for the AssociateRole.
- Parameters:
permissions
- values to be set
-
setPermissions
List of Permissions for the AssociateRole.
- Parameters:
permissions
- values to be set
-
setCustom
Custom Fields for the AssociateRole.
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of AssociateRole
-
of
factory method to create a shallow copy AssociateRole- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of AssociateRole- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for AssociateRole- Returns:
- builder
-
builder
create builder for AssociateRole instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withAssociateRole
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-