Role class abstract
A JSON value representing the role.
Properties:
- id - JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role.
- createdTime - Timestamp of the role creation, in milliseconds
- additionalInfo - Additional parameters of the role. May include: 'description' (string).
- tenantId - JSON object with Tenant Id.
- customerId - JSON object with Customer Id. Optional: when omitted the Role is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id.
- name - Role Name
- type - Type of the role: generic or group
- permissions - Set of permissions granted by this role. The JSON shape depends on the role 'type': * GENERIC — JSON object mapping
Resourceenum names to arrays ofOperationenum names allowed on that resource. The wildcard entry{\"ALL\":[\"ALL\"]}grants every operation on every resource. * GROUP — JSON array ofOperationenum names that apply to the entity group this role is bound to viaGroupPermission.entityGroupId. Only operations withallowedForGroupRole=truemay appear (seeOperationenum). The wildcard entry[\"ALL\"]grants every supported operation on the bound entity group. - excludedPermissions - Operations to subtract from those granted by
permissions. Only applicable to GENERIC roles — setting this on a GROUP role is rejected by validation. Same shape as the GENERIC variant ofpermissions: a JSON object mappingResourceenum names to non-empty arrays ofOperationenum names. At evaluation time, for each resource the listed operations are removed from the resolved permission set (e.g.permissions={\"ALL\":[\"ALL\"]}combined withexcludedPermissions={\"DEVICE\":[\"DELETE\"]}grants everything except deleting devices). May be null or an empty object when no exclusions apply. - version
- ownerId - JSON object with Customer or Tenant Id
- Annotations
-
- @BuiltValue.new()
Constructors
- Role([void updates(RoleBuilder b)])
-
factory
Properties
- additionalInfo → JsonObject?
-
Additional parameters of the role. May include: 'description' (string).
no setter
- createdTime → int?
-
Timestamp of the role creation, in milliseconds
no setter
- customerId → CustomerId?
-
JSON object with Customer Id. Optional: when omitted the Role is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id.
no setter
- excludedPermissions → JsonObject?
-
Operations to subtract from those granted by
permissions. Only applicable to GENERIC roles — setting this on a GROUP role is rejected by validation. Same shape as the GENERIC variant ofpermissions: a JSON object mappingResourceenum names to non-empty arrays ofOperationenum names. At evaluation time, for each resource the listed operations are removed from the resolved permission set (e.g.permissions={\"ALL\":[\"ALL\"]}combined withexcludedPermissions={\"DEVICE\":[\"DELETE\"]}grants everything except deleting devices). May be null or an empty object when no exclusions apply.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- id → RoleId?
-
JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role.
no setter
- name → String
-
Role Name
no setter
- ownerId → EntityId?
-
JSON object with Customer or Tenant Id
no setter
- permissions → JsonObject?
-
Set of permissions granted by this role. The JSON shape depends on the role 'type': * GENERIC — JSON object mapping
Resourceenum names to arrays ofOperationenum names allowed on that resource. The wildcard entry{\"ALL\":[\"ALL\"]}grants every operation on every resource. * GROUP — JSON array ofOperationenum names that apply to the entity group this role is bound to viaGroupPermission.entityGroupId. Only operations withallowedForGroupRole=truemay appear (seeOperationenum). The wildcard entry[\"ALL\"]grants every supported operation on the bound entity group.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tenantId → TenantId?
-
JSON object with Tenant Id.
no setter
- type → RoleType
-
Type of the role: generic or group
no setter
- version → int?
-
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rebuild(
dynamic updates(RoleBuilder)) → Role -
Rebuilds the instance.
inherited
-
toBuilder(
) → RoleBuilder -
Converts the instance to a builder
B.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
serializer
→ Serializer<
Role> -
no setter