Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 3.77 KB

File metadata and controls

44 lines (29 loc) · 3.77 KB

Role

org.thingsboard.client.model.Role

A JSON value representing the role.

Properties

Name Type Description Notes
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. [optional]
createdTime Long Timestamp of the role creation, in milliseconds [optional] [readonly]
additionalInfo com.fasterxml.jackson.databind.JsonNode Additional parameters of the role. May include: 'description' (string). [optional]
tenantId TenantId JSON object with Tenant Id. [optional] [readonly]
customerId CustomerId JSON object with Customer Id. [optional] [readonly]
name String Role Name
type RoleType Type of the role: generic or group
permissions com.fasterxml.jackson.databind.JsonNode Set of permissions granted by this role. The JSON shape depends on the role 'type': * GENERIC — JSON object mapping Resource enum names to arrays of Operation enum names allowed on that resource. The wildcard entry {\"ALL\":[\"ALL\"]} grants every operation on every resource. * GROUP — JSON array of Operation enum names that apply to the entity group this role is bound to via GroupPermission.entityGroupId. Only operations with allowedForGroupRole=true may appear (see Operation enum). The wildcard entry [\"ALL\"] grants every supported operation on the bound entity group.
excludedPermissions com.fasterxml.jackson.databind.JsonNode 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 of permissions: a JSON object mapping Resource enum names to non-empty arrays of Operation enum names. At evaluation time, for each resource the listed operations are removed from the resolved permission set (e.g. permissions={\"ALL\":[\"ALL\"]} combined with excludedPermissions={\"DEVICE\":[\"DELETE\"]} grants everything except deleting devices). May be null or an empty object when no exclusions apply. [optional]
version Long [optional]
ownerId EntityId JSON object with Customer or Tenant Id [optional] [readonly]

Referenced Types

EntityId types (AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId, etc.): {entityType: EntityType, id: UUID} — all EntityId subtypes share this structure.

RoleType (enum)

GENERIC | GROUP

EntityType (enum)

TENANT | CUSTOMER | USER | DASHBOARD | ASSET | DEVICE | ALARM | ENTITY_GROUP | CONVERTER | INTEGRATION | … (46 values total)


Conventions

  • Package: org.thingsboard.client.model
  • Getter pattern: get<PropertyName>() — e.g., getId(), getName()
  • Setter pattern: set<PropertyName>(value) — e.g., setId(value), setName(value)
  • Null fields: Getters return null for unset optional fields; they do not throw exceptions