From d0e7f95a237c9b6eca336634175ff189cb5bf14f Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Wed, 27 May 2026 10:42:10 +0300 Subject: [PATCH 1/2] Update specs and clients for 4.3.1.2 --- paas/docs/Alarm.md | 2 +- paas/docs/AlarmData.md | 2 +- paas/docs/AlarmInfo.md | 2 +- paas/docs/Asset.md | 2 +- paas/docs/AssetInfo.md | 2 +- paas/docs/Device.md | 2 +- paas/docs/DeviceInfo.md | 2 +- paas/docs/Edge.md | 4 +- paas/docs/EdgeInfo.md | 4 +- paas/docs/EntityView.md | 2 +- paas/docs/EntityViewInfo.md | 2 +- paas/docs/GroupPermissionInfo.md | 2 +- paas/docs/PageDataAlarmData.md | 2 +- paas/docs/PageDataAlarmInfo.md | 2 +- paas/docs/PageDataAsset.md | 2 +- paas/docs/PageDataAssetInfo.md | 2 +- paas/docs/PageDataDevice.md | 2 +- paas/docs/PageDataDeviceInfo.md | 2 +- paas/docs/PageDataEdge.md | 4 +- paas/docs/PageDataEdgeInfo.md | 4 +- paas/docs/PageDataEntityView.md | 2 +- paas/docs/PageDataEntityViewInfo.md | 2 +- paas/docs/PageDataReportTemplateInfo.md | 2 +- paas/docs/PageDataRole.md | 2 +- paas/docs/PageDataScheduledReportInfo.md | 2 +- paas/docs/PageDataSchedulerEventInfo.md | 2 +- .../PageDataSchedulerEventWithCustomerInfo.md | 2 +- paas/docs/ReportTemplate.md | 2 +- paas/docs/ReportTemplateInfo.md | 2 +- paas/docs/Role.md | 2 +- paas/docs/SaveDeviceWithCredentialsRequest.md | 2 +- paas/docs/ScheduledReportInfo.md | 2 +- paas/docs/SchedulerEvent.md | 2 +- paas/docs/SchedulerEventInfo.md | 2 +- paas/docs/SchedulerEventWithCustomerInfo.md | 2 +- paas/spec/openapi.json | 55 +++++++------------ paas/tb_paas_client/models/alarm.py | 2 +- paas/tb_paas_client/models/alarm_data.py | 2 +- paas/tb_paas_client/models/alarm_info.py | 2 +- paas/tb_paas_client/models/asset.py | 4 +- paas/tb_paas_client/models/asset_info.py | 4 +- paas/tb_paas_client/models/device.py | 4 +- paas/tb_paas_client/models/device_info.py | 4 +- paas/tb_paas_client/models/edge.py | 6 +- paas/tb_paas_client/models/edge_info.py | 6 +- paas/tb_paas_client/models/entity_view.py | 4 +- .../tb_paas_client/models/entity_view_info.py | 4 +- paas/tb_paas_client/models/report_template.py | 4 +- .../models/report_template_info.py | 4 +- paas/tb_paas_client/models/role.py | 4 +- .../models/scheduled_report_info.py | 4 +- paas/tb_paas_client/models/scheduler_event.py | 4 +- .../models/scheduler_event_info.py | 4 +- .../scheduler_event_with_customer_info.py | 4 +- 54 files changed, 79 insertions(+), 124 deletions(-) diff --git a/paas/docs/Alarm.md b/paas/docs/Alarm.md index c24c09ab..3ef29909 100644 --- a/paas/docs/Alarm.md +++ b/paas/docs/Alarm.md @@ -10,7 +10,7 @@ | **id** | [**AlarmId**](AlarmId.md) | JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm. | [optional] | | **created_time** | **int** | Timestamp of the alarm creation, in milliseconds | [optional] [readonly] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. | [optional] [readonly] | | **type** | **str** | representing type of the Alarm | | | **originator** | [**EntityId**](EntityId.md) | JSON object with alarm originator id | | | **severity** | [**AlarmSeverity**](AlarmSeverity.md) | Alarm severity | | diff --git a/paas/docs/AlarmData.md b/paas/docs/AlarmData.md index 0f35baee..c77facfd 100644 --- a/paas/docs/AlarmData.md +++ b/paas/docs/AlarmData.md @@ -10,7 +10,7 @@ | **id** | [**AlarmId**](AlarmId.md) | JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm. | [optional] | | **created_time** | **int** | Timestamp of the alarm creation, in milliseconds | [optional] [readonly] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. | [optional] [readonly] | | **type** | **str** | representing type of the Alarm | | | **originator** | [**EntityId**](EntityId.md) | JSON object with alarm originator id | | | **severity** | [**AlarmSeverity**](AlarmSeverity.md) | Alarm severity | | diff --git a/paas/docs/AlarmInfo.md b/paas/docs/AlarmInfo.md index 8c29a69d..aa06fcac 100644 --- a/paas/docs/AlarmInfo.md +++ b/paas/docs/AlarmInfo.md @@ -10,7 +10,7 @@ | **id** | [**AlarmId**](AlarmId.md) | JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm. | [optional] | | **created_time** | **int** | Timestamp of the alarm creation, in milliseconds | [optional] [readonly] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. | [optional] [readonly] | | **type** | **str** | representing type of the Alarm | | | **originator** | [**EntityId**](EntityId.md) | JSON object with alarm originator id | | | **severity** | [**AlarmSeverity**](AlarmSeverity.md) | Alarm severity | | diff --git a/paas/docs/Asset.md b/paas/docs/Asset.md index e4412af8..8426b349 100644 --- a/paas/docs/Asset.md +++ b/paas/docs/Asset.md @@ -11,7 +11,7 @@ | **created_time** | **int** | Timestamp of the asset creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | Additional parameters of the asset. May include: 'description' (string). | [optional] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id. | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset. | [optional] | | **name** | **str** | Unique Asset Name in scope of Tenant | | | **type** | **str** | Asset type | [optional] | | **label** | **str** | Label that may be used in widgets | [optional] | diff --git a/paas/docs/AssetInfo.md b/paas/docs/AssetInfo.md index beb580b8..68f9444d 100644 --- a/paas/docs/AssetInfo.md +++ b/paas/docs/AssetInfo.md @@ -11,7 +11,7 @@ | **created_time** | **int** | Timestamp of the asset creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | Additional parameters of the asset. May include: 'description' (string). | [optional] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id. | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset. | [optional] | | **name** | **str** | Unique Asset Name in scope of Tenant | | | **type** | **str** | Asset type | [optional] | | **label** | **str** | Label that may be used in widgets | [optional] | diff --git a/paas/docs/Device.md b/paas/docs/Device.md index ea76f7a2..d0f9fe9e 100644 --- a/paas/docs/Device.md +++ b/paas/docs/Device.md @@ -11,7 +11,7 @@ | **created_time** | **int** | Timestamp of the device creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | Additional parameters of the device. May include: 'gateway' (boolean, whether the device is a gateway), 'description' (string), 'lastConnectedGateway' (string, UUID of the last gateway that connected this device). | [optional] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device. | [optional] | | **name** | **str** | Unique Device Name in scope of Tenant | [optional] | | **type** | **str** | Device Profile Name | [optional] | | **label** | **str** | Label that may be used in widgets | [optional] | diff --git a/paas/docs/DeviceInfo.md b/paas/docs/DeviceInfo.md index 9fbd703c..0240038c 100644 --- a/paas/docs/DeviceInfo.md +++ b/paas/docs/DeviceInfo.md @@ -11,7 +11,7 @@ | **created_time** | **int** | Timestamp of the device creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | Additional parameters of the device. May include: 'gateway' (boolean, whether the device is a gateway), 'description' (string), 'lastConnectedGateway' (string, UUID of the last gateway that connected this device). | [optional] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device. | [optional] | | **name** | **str** | Unique Device Name in scope of Tenant | [optional] | | **type** | **str** | Device Profile Name | [optional] | | **label** | **str** | Label that may be used in widgets | [optional] | diff --git a/paas/docs/Edge.md b/paas/docs/Edge.md index 38cdd117..fbf10afb 100644 --- a/paas/docs/Edge.md +++ b/paas/docs/Edge.md @@ -12,8 +12,8 @@ A JSON value representing the edge. | **id** | [**EdgeId**](EdgeId.md) | JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge. | [optional] | | **created_time** | **int** | Timestamp of the edge creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | Additional parameters of the edge. May include: 'description' (string). | [optional] | -| **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id. | [optional] [readonly] | +| **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation. | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. | [optional] | | **root_rule_chain_id** | [**RuleChainId**](RuleChainId.md) | JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id. | [optional] [readonly] | | **name** | **str** | Unique Edge Name in scope of Tenant | | | **type** | **str** | Edge type | | diff --git a/paas/docs/EdgeInfo.md b/paas/docs/EdgeInfo.md index 09b7ba3e..3e12e20e 100644 --- a/paas/docs/EdgeInfo.md +++ b/paas/docs/EdgeInfo.md @@ -10,8 +10,8 @@ | **id** | [**EdgeId**](EdgeId.md) | JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge. | [optional] | | **created_time** | **int** | Timestamp of the edge creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | Additional parameters of the edge. May include: 'description' (string). | [optional] | -| **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id. | [optional] [readonly] | +| **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation. | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. | [optional] | | **root_rule_chain_id** | [**RuleChainId**](RuleChainId.md) | JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id. | [optional] [readonly] | | **name** | **str** | Unique Edge Name in scope of Tenant | | | **type** | **str** | Edge type | | diff --git a/paas/docs/EntityView.md b/paas/docs/EntityView.md index a0d9f491..75304698 100644 --- a/paas/docs/EntityView.md +++ b/paas/docs/EntityView.md @@ -14,7 +14,7 @@ A JSON object representing the entity view. | **additional_info** | **object** | Additional parameters of the entity view. May include: 'description' (string). | [optional] | | **entity_id** | [**EntityId**](EntityId.md) | JSON object with the referenced Entity Id (Device or Asset). | | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id. | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View. | [optional] | | **name** | **str** | Entity View name | | | **type** | **str** | Device Profile Name | | | **keys** | [**TelemetryEntityView**](TelemetryEntityView.md) | Set of telemetry and attribute keys to expose via Entity View. | [optional] | diff --git a/paas/docs/EntityViewInfo.md b/paas/docs/EntityViewInfo.md index 0f6e7ac0..f4c99735 100644 --- a/paas/docs/EntityViewInfo.md +++ b/paas/docs/EntityViewInfo.md @@ -12,7 +12,7 @@ | **additional_info** | **object** | Additional parameters of the entity view. May include: 'description' (string). | [optional] | | **entity_id** | [**EntityId**](EntityId.md) | JSON object with the referenced Entity Id (Device or Asset). | | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id. | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View. | [optional] | | **name** | **str** | Entity View name | | | **type** | **str** | Device Profile Name | | | **keys** | [**TelemetryEntityView**](TelemetryEntityView.md) | Set of telemetry and attribute keys to expose via Entity View. | [optional] | diff --git a/paas/docs/GroupPermissionInfo.md b/paas/docs/GroupPermissionInfo.md index 71bb38e6..5bf66d57 100644 --- a/paas/docs/GroupPermissionInfo.md +++ b/paas/docs/GroupPermissionInfo.md @@ -41,7 +41,7 @@ | created_time | int | Timestamp of the role creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the role. May include: 'description' (string). | [optional] | | tenant_id | TenantId | JSON object with Tenant Id. | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id. | [optional] [readonly] | +| customer_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. | [optional] | | name | str | Role Name | | | type | RoleType | Type of the role: generic or group | | | permissions | object | 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. | | diff --git a/paas/docs/PageDataAlarmData.md b/paas/docs/PageDataAlarmData.md index 1a669d20..f4f2d449 100644 --- a/paas/docs/PageDataAlarmData.md +++ b/paas/docs/PageDataAlarmData.md @@ -24,7 +24,7 @@ | id | AlarmId | JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm. | [optional] | | created_time | int | Timestamp of the alarm creation, in milliseconds | [optional] [readonly] | | tenant_id | TenantId | JSON object with Tenant Id | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. | [optional] [readonly] | | type | str | representing type of the Alarm | | | originator | EntityId | JSON object with alarm originator id | | | severity | AlarmSeverity | Alarm severity | | diff --git a/paas/docs/PageDataAlarmInfo.md b/paas/docs/PageDataAlarmInfo.md index 2e4899d4..9d486e23 100644 --- a/paas/docs/PageDataAlarmInfo.md +++ b/paas/docs/PageDataAlarmInfo.md @@ -24,7 +24,7 @@ | id | AlarmId | JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm. | [optional] | | created_time | int | Timestamp of the alarm creation, in milliseconds | [optional] [readonly] | | tenant_id | TenantId | JSON object with Tenant Id | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. | [optional] [readonly] | | type | str | representing type of the Alarm | | | originator | EntityId | JSON object with alarm originator id | | | severity | AlarmSeverity | Alarm severity | | diff --git a/paas/docs/PageDataAsset.md b/paas/docs/PageDataAsset.md index 96625c82..096a4c37 100644 --- a/paas/docs/PageDataAsset.md +++ b/paas/docs/PageDataAsset.md @@ -25,7 +25,7 @@ | created_time | int | Timestamp of the asset creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the asset. May include: 'description' (string). | [optional] | | tenant_id | TenantId | JSON object with Tenant Id. | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id. | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset. | [optional] | | name | str | Unique Asset Name in scope of Tenant | | | type | str | Asset type | [optional] | | label | str | Label that may be used in widgets | [optional] | diff --git a/paas/docs/PageDataAssetInfo.md b/paas/docs/PageDataAssetInfo.md index ba3ed6e0..0e97d48e 100644 --- a/paas/docs/PageDataAssetInfo.md +++ b/paas/docs/PageDataAssetInfo.md @@ -25,7 +25,7 @@ | created_time | int | Timestamp of the asset creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the asset. May include: 'description' (string). | [optional] | | tenant_id | TenantId | JSON object with Tenant Id. | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id. | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset. | [optional] | | name | str | Unique Asset Name in scope of Tenant | | | type | str | Asset type | [optional] | | label | str | Label that may be used in widgets | [optional] | diff --git a/paas/docs/PageDataDevice.md b/paas/docs/PageDataDevice.md index 45905a02..7bea51ff 100644 --- a/paas/docs/PageDataDevice.md +++ b/paas/docs/PageDataDevice.md @@ -25,7 +25,7 @@ | created_time | int | Timestamp of the device creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the device. May include: 'gateway' (boolean, whether the device is a gateway), 'description' (string), 'lastConnectedGateway' (string, UUID of the last gateway that connected this device). | [optional] | | tenant_id | TenantId | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device. | [optional] | | name | str | Unique Device Name in scope of Tenant | [optional] | | type | str | Device Profile Name | [optional] | | label | str | Label that may be used in widgets | [optional] | diff --git a/paas/docs/PageDataDeviceInfo.md b/paas/docs/PageDataDeviceInfo.md index 2c67e2d9..cf19373f 100644 --- a/paas/docs/PageDataDeviceInfo.md +++ b/paas/docs/PageDataDeviceInfo.md @@ -25,7 +25,7 @@ | created_time | int | Timestamp of the device creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the device. May include: 'gateway' (boolean, whether the device is a gateway), 'description' (string), 'lastConnectedGateway' (string, UUID of the last gateway that connected this device). | [optional] | | tenant_id | TenantId | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device. | [optional] | | name | str | Unique Device Name in scope of Tenant | [optional] | | type | str | Device Profile Name | [optional] | | label | str | Label that may be used in widgets | [optional] | diff --git a/paas/docs/PageDataEdge.md b/paas/docs/PageDataEdge.md index 21e42f9d..60f6edc6 100644 --- a/paas/docs/PageDataEdge.md +++ b/paas/docs/PageDataEdge.md @@ -24,8 +24,8 @@ | id | EdgeId | JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge. | [optional] | | created_time | int | Timestamp of the edge creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the edge. May include: 'description' (string). | [optional] | -| tenant_id | TenantId | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id. | [optional] [readonly] | +| tenant_id | TenantId | JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation. | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. | [optional] | | root_rule_chain_id | RuleChainId | JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id. | [optional] [readonly] | | name | str | Unique Edge Name in scope of Tenant | | | type | str | Edge type | | diff --git a/paas/docs/PageDataEdgeInfo.md b/paas/docs/PageDataEdgeInfo.md index 7b6d0cf9..874a325c 100644 --- a/paas/docs/PageDataEdgeInfo.md +++ b/paas/docs/PageDataEdgeInfo.md @@ -24,8 +24,8 @@ | id | EdgeId | JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge. | [optional] | | created_time | int | Timestamp of the edge creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the edge. May include: 'description' (string). | [optional] | -| tenant_id | TenantId | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id. | [optional] [readonly] | +| tenant_id | TenantId | JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation. | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. | [optional] | | root_rule_chain_id | RuleChainId | JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id. | [optional] [readonly] | | name | str | Unique Edge Name in scope of Tenant | | | type | str | Edge type | | diff --git a/paas/docs/PageDataEntityView.md b/paas/docs/PageDataEntityView.md index 59883dde..cd84862d 100644 --- a/paas/docs/PageDataEntityView.md +++ b/paas/docs/PageDataEntityView.md @@ -26,7 +26,7 @@ | additional_info | object | Additional parameters of the entity view. May include: 'description' (string). | [optional] | | entity_id | EntityId | JSON object with the referenced Entity Id (Device or Asset). | | | tenant_id | TenantId | JSON object with Tenant Id. | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id. | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View. | [optional] | | name | str | Entity View name | | | type | str | Device Profile Name | | | keys | TelemetryEntityView | Set of telemetry and attribute keys to expose via Entity View. | [optional] | diff --git a/paas/docs/PageDataEntityViewInfo.md b/paas/docs/PageDataEntityViewInfo.md index 00be9aa8..70685eda 100644 --- a/paas/docs/PageDataEntityViewInfo.md +++ b/paas/docs/PageDataEntityViewInfo.md @@ -26,7 +26,7 @@ | additional_info | object | Additional parameters of the entity view. May include: 'description' (string). | [optional] | | entity_id | EntityId | JSON object with the referenced Entity Id (Device or Asset). | | | tenant_id | TenantId | JSON object with Tenant Id. | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id. | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View. | [optional] | | name | str | Entity View name | | | type | str | Device Profile Name | | | keys | TelemetryEntityView | Set of telemetry and attribute keys to expose via Entity View. | [optional] | diff --git a/paas/docs/PageDataReportTemplateInfo.md b/paas/docs/PageDataReportTemplateInfo.md index 80404ef9..0663cc85 100644 --- a/paas/docs/PageDataReportTemplateInfo.md +++ b/paas/docs/PageDataReportTemplateInfo.md @@ -24,7 +24,7 @@ | id | ReportTemplateId | JSON object with the report template Id. Specify this field to update the report. Referencing non-existing report template Id will cause error. Omit this field to create new report template | [optional] | | created_time | int | Timestamp of the report template creation, in milliseconds | [optional] [readonly] | | tenant_id | TenantId | JSON object with Tenant Id. Tenant Id of the report template can't be changed. | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Optional: when omitted the Report Template 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. | [optional] | | name | str | Report name | | | format | TbReportFormat | Report format | | | type | ReportTemplateType | Report template type | | diff --git a/paas/docs/PageDataRole.md b/paas/docs/PageDataRole.md index 3ea26dff..a9fdc1cf 100644 --- a/paas/docs/PageDataRole.md +++ b/paas/docs/PageDataRole.md @@ -25,7 +25,7 @@ | created_time | int | Timestamp of the role creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the role. May include: 'description' (string). | [optional] | | tenant_id | TenantId | JSON object with Tenant Id. | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id. | [optional] [readonly] | +| customer_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. | [optional] | | name | str | Role Name | | | type | RoleType | Type of the role: generic or group | | | permissions | object | 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. | | diff --git a/paas/docs/PageDataScheduledReportInfo.md b/paas/docs/PageDataScheduledReportInfo.md index f09861ef..69044151 100644 --- a/paas/docs/PageDataScheduledReportInfo.md +++ b/paas/docs/PageDataScheduledReportInfo.md @@ -25,7 +25,7 @@ | created_time | int | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the scheduler event | [optional] | | tenant_id | TenantId | JSON object with Tenant Id | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Optional: when omitted the Scheduler Event 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. | [optional] | | originator_id | EntityId | JSON object with Originator Id | [optional] [readonly] | | name | str | scheduler event name | [optional] | | type | str | scheduler event type | [optional] | diff --git a/paas/docs/PageDataSchedulerEventInfo.md b/paas/docs/PageDataSchedulerEventInfo.md index d004f015..c444edeb 100644 --- a/paas/docs/PageDataSchedulerEventInfo.md +++ b/paas/docs/PageDataSchedulerEventInfo.md @@ -25,7 +25,7 @@ | created_time | int | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the scheduler event | [optional] | | tenant_id | TenantId | JSON object with Tenant Id | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Optional: when omitted the Scheduler Event 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. | [optional] | | originator_id | EntityId | JSON object with Originator Id | [optional] [readonly] | | name | str | scheduler event name | [optional] | | type | str | scheduler event type | [optional] | diff --git a/paas/docs/PageDataSchedulerEventWithCustomerInfo.md b/paas/docs/PageDataSchedulerEventWithCustomerInfo.md index b69ecca7..8d8a2200 100644 --- a/paas/docs/PageDataSchedulerEventWithCustomerInfo.md +++ b/paas/docs/PageDataSchedulerEventWithCustomerInfo.md @@ -25,7 +25,7 @@ | created_time | int | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the scheduler event | [optional] | | tenant_id | TenantId | JSON object with Tenant Id | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Optional: when omitted the Scheduler Event 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. | [optional] | | originator_id | EntityId | JSON object with Originator Id | [optional] [readonly] | | name | str | scheduler event name | [optional] | | type | str | scheduler event type | [optional] | diff --git a/paas/docs/ReportTemplate.md b/paas/docs/ReportTemplate.md index 6c2b2fa0..8fe645db 100644 --- a/paas/docs/ReportTemplate.md +++ b/paas/docs/ReportTemplate.md @@ -12,7 +12,7 @@ A JSON value representing the Report Template. | **id** | [**ReportTemplateId**](ReportTemplateId.md) | JSON object with the report template Id. Specify this field to update the report. Referencing non-existing report template Id will cause error. Omit this field to create new report template | [optional] | | **created_time** | **int** | Timestamp of the report template creation, in milliseconds | [optional] [readonly] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. Tenant Id of the report template can't be changed. | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Optional: when omitted the Report Template 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. | [optional] | | **name** | **str** | Report name | | | **format** | [**TbReportFormat**](TbReportFormat.md) | Report format | | | **type** | [**ReportTemplateType**](ReportTemplateType.md) | Report template type | | diff --git a/paas/docs/ReportTemplateInfo.md b/paas/docs/ReportTemplateInfo.md index 529dca39..cbac57be 100644 --- a/paas/docs/ReportTemplateInfo.md +++ b/paas/docs/ReportTemplateInfo.md @@ -10,7 +10,7 @@ | **id** | [**ReportTemplateId**](ReportTemplateId.md) | JSON object with the report template Id. Specify this field to update the report. Referencing non-existing report template Id will cause error. Omit this field to create new report template | [optional] | | **created_time** | **int** | Timestamp of the report template creation, in milliseconds | [optional] [readonly] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. Tenant Id of the report template can't be changed. | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Optional: when omitted the Report Template 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. | [optional] | | **name** | **str** | Report name | | | **format** | [**TbReportFormat**](TbReportFormat.md) | Report format | | | **type** | [**ReportTemplateType**](ReportTemplateType.md) | Report template type | | diff --git a/paas/docs/Role.md b/paas/docs/Role.md index 358005ac..8bd2feca 100644 --- a/paas/docs/Role.md +++ b/paas/docs/Role.md @@ -13,7 +13,7 @@ A JSON value representing the role. | **created_time** | **int** | Timestamp of the role creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | Additional parameters of the role. May include: 'description' (string). | [optional] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | 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. | [optional] | | **name** | **str** | Role Name | | | **type** | [**RoleType**](RoleType.md) | Type of the role: generic or group | | | **permissions** | **object** | 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. | | diff --git a/paas/docs/SaveDeviceWithCredentialsRequest.md b/paas/docs/SaveDeviceWithCredentialsRequest.md index 170c5da8..b0dda3d8 100644 --- a/paas/docs/SaveDeviceWithCredentialsRequest.md +++ b/paas/docs/SaveDeviceWithCredentialsRequest.md @@ -25,7 +25,7 @@ The JSON object with device and credentials. See method description above for ex | created_time | int | Timestamp of the device creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the device. May include: 'gateway' (boolean, whether the device is a gateway), 'description' (string), 'lastConnectedGateway' (string, UUID of the last gateway that connected this device). | [optional] | | tenant_id | TenantId | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| customer_id | CustomerId | JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. | [optional] [readonly] | +| customer_id | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device. | [optional] | | name | str | Unique Device Name in scope of Tenant | [optional] | | type | str | Device Profile Name | [optional] | | label | str | Label that may be used in widgets | [optional] | diff --git a/paas/docs/ScheduledReportInfo.md b/paas/docs/ScheduledReportInfo.md index 49d2ae71..101ca94c 100644 --- a/paas/docs/ScheduledReportInfo.md +++ b/paas/docs/ScheduledReportInfo.md @@ -11,7 +11,7 @@ | **created_time** | **int** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | Additional parameters of the scheduler event | [optional] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Optional: when omitted the Scheduler Event 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. | [optional] | | **originator_id** | [**EntityId**](EntityId.md) | JSON object with Originator Id | [optional] [readonly] | | **name** | **str** | scheduler event name | [optional] | | **type** | **str** | scheduler event type | [optional] | diff --git a/paas/docs/SchedulerEvent.md b/paas/docs/SchedulerEvent.md index 5dd50120..4abdfca7 100644 --- a/paas/docs/SchedulerEvent.md +++ b/paas/docs/SchedulerEvent.md @@ -13,7 +13,7 @@ A JSON value representing the Scheduler Event. | **created_time** | **int** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | Additional parameters of the scheduler event | [optional] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Optional: when omitted the Scheduler Event 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. | [optional] | | **originator_id** | [**EntityId**](EntityId.md) | JSON object with Originator Id | [optional] [readonly] | | **name** | **str** | scheduler event name | [optional] | | **type** | **str** | scheduler event type | [optional] | diff --git a/paas/docs/SchedulerEventInfo.md b/paas/docs/SchedulerEventInfo.md index a069b3bd..c9c541fc 100644 --- a/paas/docs/SchedulerEventInfo.md +++ b/paas/docs/SchedulerEventInfo.md @@ -11,7 +11,7 @@ | **created_time** | **int** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | Additional parameters of the scheduler event | [optional] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Optional: when omitted the Scheduler Event 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. | [optional] | | **originator_id** | [**EntityId**](EntityId.md) | JSON object with Originator Id | [optional] [readonly] | | **name** | **str** | scheduler event name | [optional] | | **type** | **str** | scheduler event type | [optional] | diff --git a/paas/docs/SchedulerEventWithCustomerInfo.md b/paas/docs/SchedulerEventWithCustomerInfo.md index 264d1ef6..536c670b 100644 --- a/paas/docs/SchedulerEventWithCustomerInfo.md +++ b/paas/docs/SchedulerEventWithCustomerInfo.md @@ -11,7 +11,7 @@ | **created_time** | **int** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | Additional parameters of the scheduler event | [optional] | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id | [optional] [readonly] | -| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. Optional: when omitted the Scheduler Event 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. | [optional] | | **originator_id** | [**EntityId**](EntityId.md) | JSON object with Originator Id | [optional] [readonly] | | **name** | **str** | scheduler event name | [optional] | | **type** | **str** | scheduler event type | [optional] | diff --git a/paas/spec/openapi.json b/paas/spec/openapi.json index 63336d43..30c03fb7 100644 --- a/paas/spec/openapi.json +++ b/paas/spec/openapi.json @@ -134783,7 +134783,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", + "description": "JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected.", "readOnly": true }, "type": { @@ -135509,7 +135509,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", + "description": "JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected.", "readOnly": true }, "type": { @@ -135814,7 +135814,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", + "description": "JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected.", "readOnly": true }, "type": { @@ -137066,8 +137066,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset." }, "name": { "type": "string", @@ -137170,8 +137169,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset." }, "name": { "type": "string", @@ -142001,8 +141999,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device." }, "name": { "type": "string", @@ -142346,8 +142343,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device." }, "name": { "type": "string", @@ -143299,13 +143295,12 @@ }, "tenantId": { "$ref": "#/components/schemas/TenantId", - "description": "JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", + "description": "JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation.", "readOnly": true }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id." }, "rootRuleChainId": { "$ref": "#/components/schemas/RuleChainId", @@ -143661,13 +143656,12 @@ }, "tenantId": { "$ref": "#/components/schemas/TenantId", - "description": "JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", + "description": "JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation.", "readOnly": true }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id." }, "rootRuleChainId": { "$ref": "#/components/schemas/RuleChainId", @@ -145591,8 +145585,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View." }, "name": { "type": "string", @@ -145706,8 +145699,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View." }, "name": { "type": "string", @@ -155959,8 +155951,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Report Template 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": { "type": "string", @@ -156137,8 +156128,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Report Template 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": { "type": "string", @@ -156646,8 +156636,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. ", - "readOnly": true + "description": "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": { "type": "string", @@ -157554,8 +157543,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Scheduler Event 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." }, "originatorId": { "$ref": "#/components/schemas/EntityId", @@ -157633,8 +157621,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Scheduler Event 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." }, "originatorId": { "$ref": "#/components/schemas/EntityId", @@ -157778,8 +157765,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Scheduler Event 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." }, "originatorId": { "$ref": "#/components/schemas/EntityId", @@ -157841,8 +157827,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Scheduler Event 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." }, "originatorId": { "$ref": "#/components/schemas/EntityId", diff --git a/paas/tb_paas_client/models/alarm.py b/paas/tb_paas_client/models/alarm.py index 42993a83..4b240f1c 100644 --- a/paas/tb_paas_client/models/alarm.py +++ b/paas/tb_paas_client/models/alarm.py @@ -40,7 +40,7 @@ class Alarm(BaseModel): id: Optional[AlarmId] = Field(default=None, description="JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm.") created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the alarm creation, in milliseconds", serialization_alias="createdTime") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected.", serialization_alias="customerId") type: StrictStr = Field(description="representing type of the Alarm") originator: EntityId = Field(description="JSON object with alarm originator id") severity: AlarmSeverity = Field(description="Alarm severity") diff --git a/paas/tb_paas_client/models/alarm_data.py b/paas/tb_paas_client/models/alarm_data.py index f3b77651..118af27e 100644 --- a/paas/tb_paas_client/models/alarm_data.py +++ b/paas/tb_paas_client/models/alarm_data.py @@ -42,7 +42,7 @@ class AlarmData(BaseModel): id: Optional[AlarmId] = Field(default=None, description="JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm.") created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the alarm creation, in milliseconds", serialization_alias="createdTime") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected.", serialization_alias="customerId") type: StrictStr = Field(description="representing type of the Alarm") originator: EntityId = Field(description="JSON object with alarm originator id") severity: AlarmSeverity = Field(description="Alarm severity") diff --git a/paas/tb_paas_client/models/alarm_info.py b/paas/tb_paas_client/models/alarm_info.py index 4b94bc90..53dc2814 100644 --- a/paas/tb_paas_client/models/alarm_info.py +++ b/paas/tb_paas_client/models/alarm_info.py @@ -41,7 +41,7 @@ class AlarmInfo(BaseModel): id: Optional[AlarmId] = Field(default=None, description="JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm.") created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the alarm creation, in milliseconds", serialization_alias="createdTime") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected.", serialization_alias="customerId") type: StrictStr = Field(description="representing type of the Alarm") originator: EntityId = Field(description="JSON object with alarm originator id") severity: AlarmSeverity = Field(description="Alarm severity") diff --git a/paas/tb_paas_client/models/asset.py b/paas/tb_paas_client/models/asset.py index 02a6b277..8554f0f5 100644 --- a/paas/tb_paas_client/models/asset.py +++ b/paas/tb_paas_client/models/asset.py @@ -39,7 +39,7 @@ class Asset(BaseModel): created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the asset creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the asset. May include: 'description' (string).", serialization_alias="additionalInfo") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id.", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id.", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset.", serialization_alias="customerId") name: StrictStr = Field(description="Unique Asset Name in scope of Tenant") type: Optional[StrictStr] = Field(default=None, description="Asset type") label: Optional[StrictStr] = Field(default=None, description="Label that may be used in widgets") @@ -86,12 +86,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "owner_id", ]) diff --git a/paas/tb_paas_client/models/asset_info.py b/paas/tb_paas_client/models/asset_info.py index 8a8d9c10..3e2aabc4 100644 --- a/paas/tb_paas_client/models/asset_info.py +++ b/paas/tb_paas_client/models/asset_info.py @@ -40,7 +40,7 @@ class AssetInfo(BaseModel): created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the asset creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the asset. May include: 'description' (string).", serialization_alias="additionalInfo") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id.", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id.", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset.", serialization_alias="customerId") name: StrictStr = Field(description="Unique Asset Name in scope of Tenant") type: Optional[StrictStr] = Field(default=None, description="Asset type") label: Optional[StrictStr] = Field(default=None, description="Label that may be used in widgets") @@ -90,12 +90,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "owner_name", "owner_id", ]) diff --git a/paas/tb_paas_client/models/device.py b/paas/tb_paas_client/models/device.py index 743c223c..d3886887 100644 --- a/paas/tb_paas_client/models/device.py +++ b/paas/tb_paas_client/models/device.py @@ -41,7 +41,7 @@ class Device(BaseModel): created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the device creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the device. May include: 'gateway' (boolean, whether the device is a gateway), 'description' (string), 'lastConnectedGateway' (string, UUID of the last gateway that connected this device).", serialization_alias="additionalInfo") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id.", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device.", serialization_alias="customerId") name: Optional[StrictStr] = Field(default=None, description="Unique Device Name in scope of Tenant") type: Optional[StrictStr] = Field(default=None, description="Device Profile Name") label: Optional[StrictStr] = Field(default=None, description="Label that may be used in widgets") @@ -91,12 +91,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "owner_id", ]) diff --git a/paas/tb_paas_client/models/device_info.py b/paas/tb_paas_client/models/device_info.py index 959c9bc9..94996281 100644 --- a/paas/tb_paas_client/models/device_info.py +++ b/paas/tb_paas_client/models/device_info.py @@ -42,7 +42,7 @@ class DeviceInfo(BaseModel): created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the device creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the device. May include: 'gateway' (boolean, whether the device is a gateway), 'description' (string), 'lastConnectedGateway' (string, UUID of the last gateway that connected this device).", serialization_alias="additionalInfo") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id.", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device.", serialization_alias="customerId") name: Optional[StrictStr] = Field(default=None, description="Unique Device Name in scope of Tenant") type: Optional[StrictStr] = Field(default=None, description="Device Profile Name") label: Optional[StrictStr] = Field(default=None, description="Label that may be used in widgets") @@ -97,12 +97,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "owner_name", "active", "owner_id", diff --git a/paas/tb_paas_client/models/edge.py b/paas/tb_paas_client/models/edge.py index 7011ae60..be41033e 100644 --- a/paas/tb_paas_client/models/edge.py +++ b/paas/tb_paas_client/models/edge.py @@ -39,8 +39,8 @@ class Edge(BaseModel): id: Optional[EdgeId] = Field(default=None, description="JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge.") created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the edge creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the edge. May include: 'description' (string).", serialization_alias="additionalInfo") - tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id.", serialization_alias="customerId") + tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation.", serialization_alias="tenantId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id.", serialization_alias="customerId") root_rule_chain_id: Optional[RuleChainId] = Field(default=None, description="JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id.", serialization_alias="rootRuleChainId") name: StrictStr = Field(description="Unique Edge Name in scope of Tenant") type: StrictStr = Field(description="Edge type") @@ -93,12 +93,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "root_rule_chain_id", "owner_id", ]) diff --git a/paas/tb_paas_client/models/edge_info.py b/paas/tb_paas_client/models/edge_info.py index 6c9ee28f..6af67841 100644 --- a/paas/tb_paas_client/models/edge_info.py +++ b/paas/tb_paas_client/models/edge_info.py @@ -40,8 +40,8 @@ class EdgeInfo(BaseModel): id: Optional[EdgeId] = Field(default=None, description="JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge.") created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the edge creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the edge. May include: 'description' (string).", serialization_alias="additionalInfo") - tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id.", serialization_alias="customerId") + tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation.", serialization_alias="tenantId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id.", serialization_alias="customerId") root_rule_chain_id: Optional[RuleChainId] = Field(default=None, description="JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id.", serialization_alias="rootRuleChainId") name: StrictStr = Field(description="Unique Edge Name in scope of Tenant") type: StrictStr = Field(description="Edge type") @@ -97,12 +97,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "root_rule_chain_id", "owner_name", "owner_id", diff --git a/paas/tb_paas_client/models/entity_view.py b/paas/tb_paas_client/models/entity_view.py index edfca00e..d081cdf8 100644 --- a/paas/tb_paas_client/models/entity_view.py +++ b/paas/tb_paas_client/models/entity_view.py @@ -40,7 +40,7 @@ class EntityView(BaseModel): additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the entity view. May include: 'description' (string).", serialization_alias="additionalInfo") entity_id: EntityId = Field(description="JSON object with the referenced Entity Id (Device or Asset).", serialization_alias="entityId") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id.", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View.", serialization_alias="customerId") name: StrictStr = Field(description="Entity View name") type: StrictStr = Field(description="Device Profile Name") keys: Optional[TelemetryEntityView] = Field(default=None, description="Set of telemetry and attribute keys to expose via Entity View.") @@ -88,12 +88,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "owner_id", ]) diff --git a/paas/tb_paas_client/models/entity_view_info.py b/paas/tb_paas_client/models/entity_view_info.py index 16b85afa..55730f17 100644 --- a/paas/tb_paas_client/models/entity_view_info.py +++ b/paas/tb_paas_client/models/entity_view_info.py @@ -41,7 +41,7 @@ class EntityViewInfo(BaseModel): additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the entity view. May include: 'description' (string).", serialization_alias="additionalInfo") entity_id: EntityId = Field(description="JSON object with the referenced Entity Id (Device or Asset).", serialization_alias="entityId") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id.", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View.", serialization_alias="customerId") name: StrictStr = Field(description="Entity View name") type: StrictStr = Field(description="Device Profile Name") keys: Optional[TelemetryEntityView] = Field(default=None, description="Set of telemetry and attribute keys to expose via Entity View.") @@ -92,12 +92,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "owner_name", "owner_id", ]) diff --git a/paas/tb_paas_client/models/report_template.py b/paas/tb_paas_client/models/report_template.py index 0a123e6e..d3d2948e 100644 --- a/paas/tb_paas_client/models/report_template.py +++ b/paas/tb_paas_client/models/report_template.py @@ -40,7 +40,7 @@ class ReportTemplate(BaseModel): id: Optional[ReportTemplateId] = Field(default=None, description="JSON object with the report template Id. Specify this field to update the report. Referencing non-existing report template Id will cause error. Omit this field to create new report template") created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the report template creation, in milliseconds", serialization_alias="createdTime") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id. Tenant Id of the report template can't be changed.", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Optional: when omitted the Report Template 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.", serialization_alias="customerId") name: StrictStr = Field(description="Report name") format: TbReportFormat = Field(description="Report format") type: ReportTemplateType = Field(description="Report template type") @@ -88,12 +88,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "owner_id", ]) diff --git a/paas/tb_paas_client/models/report_template_info.py b/paas/tb_paas_client/models/report_template_info.py index 5e8e9fe5..8f366099 100644 --- a/paas/tb_paas_client/models/report_template_info.py +++ b/paas/tb_paas_client/models/report_template_info.py @@ -39,7 +39,7 @@ class ReportTemplateInfo(BaseModel): id: Optional[ReportTemplateId] = Field(default=None, description="JSON object with the report template Id. Specify this field to update the report. Referencing non-existing report template Id will cause error. Omit this field to create new report template") created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the report template creation, in milliseconds", serialization_alias="createdTime") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id. Tenant Id of the report template can't be changed.", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Optional: when omitted the Report Template 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.", serialization_alias="customerId") name: StrictStr = Field(description="Report name") format: TbReportFormat = Field(description="Report format") type: ReportTemplateType = Field(description="Report template type") @@ -88,12 +88,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "owner_name", "owner_id", ]) diff --git a/paas/tb_paas_client/models/role.py b/paas/tb_paas_client/models/role.py index 7ffaf217..0ee6a071 100644 --- a/paas/tb_paas_client/models/role.py +++ b/paas/tb_paas_client/models/role.py @@ -39,7 +39,7 @@ class Role(BaseModel): created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the role creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the role. May include: 'description' (string).", serialization_alias="additionalInfo") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id.", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. ", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="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.", serialization_alias="customerId") name: StrictStr = Field(description="Role Name") type: RoleType = Field(description="Type of the role: generic or group") permissions: Optional[Any] = Field(default=None, description="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.") @@ -86,12 +86,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "owner_id", ]) diff --git a/paas/tb_paas_client/models/scheduled_report_info.py b/paas/tb_paas_client/models/scheduled_report_info.py index 14cf87a6..f57cb835 100644 --- a/paas/tb_paas_client/models/scheduled_report_info.py +++ b/paas/tb_paas_client/models/scheduled_report_info.py @@ -39,7 +39,7 @@ class ScheduledReportInfo(BaseModel): created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the scheduler event creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the scheduler event", serialization_alias="additionalInfo") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Optional: when omitted the Scheduler Event 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.", serialization_alias="customerId") originator_id: Optional[EntityId] = Field(default=None, description="JSON object with Originator Id", serialization_alias="originatorId") name: Optional[StrictStr] = Field(default=None, description="scheduler event name") type: Optional[StrictStr] = Field(default=None, description="scheduler event type") @@ -94,12 +94,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "originator_id", "template_info", "customer_title", diff --git a/paas/tb_paas_client/models/scheduler_event.py b/paas/tb_paas_client/models/scheduler_event.py index 521f3791..3f13adfc 100644 --- a/paas/tb_paas_client/models/scheduler_event.py +++ b/paas/tb_paas_client/models/scheduler_event.py @@ -38,7 +38,7 @@ class SchedulerEvent(BaseModel): created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the scheduler event creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the scheduler event", serialization_alias="additionalInfo") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Optional: when omitted the Scheduler Event 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.", serialization_alias="customerId") originator_id: Optional[EntityId] = Field(default=None, description="JSON object with Originator Id", serialization_alias="originatorId") name: Optional[StrictStr] = Field(default=None, description="scheduler event name") type: Optional[StrictStr] = Field(default=None, description="scheduler event type") @@ -88,12 +88,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "originator_id", "owner_id", ]) diff --git a/paas/tb_paas_client/models/scheduler_event_info.py b/paas/tb_paas_client/models/scheduler_event_info.py index ad1406b0..78fdc03c 100644 --- a/paas/tb_paas_client/models/scheduler_event_info.py +++ b/paas/tb_paas_client/models/scheduler_event_info.py @@ -38,7 +38,7 @@ class SchedulerEventInfo(BaseModel): created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the scheduler event creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the scheduler event", serialization_alias="additionalInfo") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Optional: when omitted the Scheduler Event 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.", serialization_alias="customerId") originator_id: Optional[EntityId] = Field(default=None, description="JSON object with Originator Id", serialization_alias="originatorId") name: Optional[StrictStr] = Field(default=None, description="scheduler event name") type: Optional[StrictStr] = Field(default=None, description="scheduler event type") @@ -87,12 +87,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "originator_id", "owner_id", ]) diff --git a/paas/tb_paas_client/models/scheduler_event_with_customer_info.py b/paas/tb_paas_client/models/scheduler_event_with_customer_info.py index 37d35024..1faeb489 100644 --- a/paas/tb_paas_client/models/scheduler_event_with_customer_info.py +++ b/paas/tb_paas_client/models/scheduler_event_with_customer_info.py @@ -38,7 +38,7 @@ class SchedulerEventWithCustomerInfo(BaseModel): created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the scheduler event creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the scheduler event", serialization_alias="additionalInfo") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id", serialization_alias="tenantId") - customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id", serialization_alias="customerId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. Optional: when omitted the Scheduler Event 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.", serialization_alias="customerId") originator_id: Optional[EntityId] = Field(default=None, description="JSON object with Originator Id", serialization_alias="originatorId") name: Optional[StrictStr] = Field(default=None, description="scheduler event name") type: Optional[StrictStr] = Field(default=None, description="scheduler event type") @@ -91,12 +91,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "created_time", "tenant_id", - "customer_id", "originator_id", "customer_is_public", "owner_id", From 6398252491cdb8627983e312fc09fe127e77ca37 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Wed, 27 May 2026 10:43:49 +0300 Subject: [PATCH 2/2] ruff format --- scripts/post_process.py | 13 ++----- tests/test_post_process.py | 56 +++++++++++++++++++++-------- tests/test_python_client_docs_ce.py | 18 +++++----- tests/test_python_client_docs_pe.py | 22 ++++++------ 4 files changed, 66 insertions(+), 43 deletions(-) diff --git a/scripts/post_process.py b/scripts/post_process.py index 44c5cc20..18a613f2 100644 --- a/scripts/post_process.py +++ b/scripts/post_process.py @@ -675,10 +675,7 @@ def _inject_discriminator_override( ) needs_field_import = True else: - new_line = ( - f" {py_field}: {field_type} = {default_expr}" - f" {_DISCRIMINATOR_INJECT_TAG}\n" - ) + new_line = f" {py_field}: {field_type} = {default_expr} {_DISCRIMINATOR_INJECT_TAG}\n" needs_field_import = False new_content = child_content[:insert_pos] + new_line + child_content[insert_pos:] @@ -713,9 +710,7 @@ def fix_polymorphic_discriminator_defaults( subclasses_patched = 0 subclasses_skipped = 0 - discriminator_re = re.compile( - r"__discriminator_property_name: ClassVar\[str\] = '([^']+)'" - ) + discriminator_re = re.compile(r"__discriminator_property_name: ClassVar\[str\] = '([^']+)'") mapping_re = re.compile( r"__discriminator_value_class_map: ClassVar\[Dict\[str, str\]\] = \{\s*([^}]*)\}", re.DOTALL, @@ -970,9 +965,7 @@ def fix_missing_2xx_response_types(api_dir: Path) -> int: if method_name == "__init__": continue scope_start = m.start() - scope_end = ( - method_defs[idx + 1].start() if idx + 1 < len(method_defs) else len(content) - ) + scope_end = method_defs[idx + 1].start() if idx + 1 < len(method_defs) else len(content) # Find _response_types_map within this method's scope map_m = _RESPONSE_TYPES_MAP_RE.search(content, scope_start, scope_end) diff --git a/tests/test_post_process.py b/tests/test_post_process.py index 30a0df3f..9e6b5ff9 100644 --- a/tests/test_post_process.py +++ b/tests/test_post_process.py @@ -453,8 +453,14 @@ def test_rewrite_init_files_writes_pyi(tmp_path): # --------------------------------------------------------------------------- -def _write_parent(models_dir: Path, *, property_name: str, mapping: dict[str, str], - field_type: str = "StrictStr", class_name: str = "Parent") -> Path: +def _write_parent( + models_dir: Path, + *, + property_name: str, + mapping: dict[str, str], + field_type: str = "StrictStr", + class_name: str = "Parent", +) -> Path: """Write a minimal parent model file with the given discriminator mapping.""" field_py = post_process._camel_to_snake(property_name) pairs = ",".join(f"'{k}': '{v}'" for k, v in mapping.items()) @@ -478,8 +484,14 @@ class {class_name}(BaseModel): return path -def _write_child(models_dir: Path, *, class_name: str, parent: str, - field_py: str = "type", field_type: str = "StrictStr") -> Path: +def _write_child( + models_dir: Path, + *, + class_name: str, + parent: str, + field_py: str = "type", + field_type: str = "StrictStr", +) -> Path: """Write a minimal child model file with no discriminator default.""" content = f'''\ from pydantic import Field, StrictStr @@ -505,8 +517,12 @@ def discriminator_models_dir(tmp_path): def test_discriminator_patches_strict_str_subclass(discriminator_models_dir): """Real OpenAPI mapping (key != class name) -> inject string default.""" - _write_parent(discriminator_models_dir, property_name="type", - mapping={"DEVICE": "DeviceFilter"}, class_name="EntityFilter") + _write_parent( + discriminator_models_dir, + property_name="type", + mapping={"DEVICE": "DeviceFilter"}, + class_name="EntityFilter", + ) child = _write_child(discriminator_models_dir, class_name="DeviceFilter", parent="EntityFilter") parents, patched, skipped = post_process.fix_polymorphic_discriminator_defaults( @@ -520,8 +536,12 @@ def test_discriminator_patches_strict_str_subclass(discriminator_models_dir): def test_discriminator_skips_class_name_fallback(discriminator_models_dir): """No explicit mapping (key == class name) -> skip rather than write garbage.""" - _write_parent(discriminator_models_dir, property_name="securityMode", - mapping={"PSKChild": "PSKChild"}, class_name="Credential") + _write_parent( + discriminator_models_dir, + property_name="securityMode", + mapping={"PSKChild": "PSKChild"}, + class_name="Credential", + ) child = _write_child(discriminator_models_dir, class_name="PSKChild", parent="Credential") parents, patched, skipped = post_process.fix_polymorphic_discriminator_defaults( @@ -535,8 +555,12 @@ def test_discriminator_skips_class_name_fallback(discriminator_models_dir): def test_discriminator_idempotent_on_rerun(discriminator_models_dir): """Second run is a no-op once the tag is present.""" - _write_parent(discriminator_models_dir, property_name="type", - mapping={"DEVICE": "DeviceFilter"}, class_name="EntityFilter") + _write_parent( + discriminator_models_dir, + property_name="type", + mapping={"DEVICE": "DeviceFilter"}, + class_name="EntityFilter", + ) _write_child(discriminator_models_dir, class_name="DeviceFilter", parent="EntityFilter") post_process.fix_polymorphic_discriminator_defaults(discriminator_models_dir, "tb_test_client") @@ -548,8 +572,12 @@ def test_discriminator_idempotent_on_rerun(discriminator_models_dir): def test_discriminator_bails_without_docstring_close(discriminator_models_dir): """Skip injection when the generated docstring close marker is absent.""" - _write_parent(discriminator_models_dir, property_name="type", - mapping={"DEVICE": "DeviceFilter"}, class_name="EntityFilter") + _write_parent( + discriminator_models_dir, + property_name="type", + mapping={"DEVICE": "DeviceFilter"}, + class_name="EntityFilter", + ) child = discriminator_models_dir / "device_filter.py" child.write_text( "from pydantic import Field\n" @@ -675,7 +703,7 @@ def test_default_none_skips_default_factory(tmp_path): # --------------------------------------------------------------------------- -_RESP_MAP_TEMPLATE = '''\ +_RESP_MAP_TEMPLATE = """\ class FooApi: def get_thing(self) -> List[Foo]: _response_types_map: Dict[str, Optional[str]] = {{ @@ -694,7 +722,7 @@ def get_thing_without_preload_content(self) -> RESTResponseType: {entries} }} return _response_types_map -''' +""" def test_response_types_injects_missing_200(tmp_path): diff --git a/tests/test_python_client_docs_ce.py b/tests/test_python_client_docs_ce.py index 5063c2ee..614b5b0c 100644 --- a/tests/test_python_client_docs_ce.py +++ b/tests/test_python_client_docs_ce.py @@ -139,9 +139,9 @@ def test_rate_limit_handling_builder_options(mock_http): client = ThingsboardClient( MOCK_URL, api_key=API_KEY, - max_retries=3, # default 3 - initial_retry_delay_ms=1_000, # default 1 s - max_retry_delay_ms=30_000, # default 30 s + max_retries=3, # default 3 + initial_retry_delay_ms=1_000, # default 1 s + max_retry_delay_ms=30_000, # default 30 s ) # post-snippet verification: the tuned client was constructed and exposes the API surface @@ -319,16 +319,18 @@ def _route_with_dynamic_count(): # === doc snippet === from tb_ce_client import ThingsboardClient from tb_ce_client.models import ( - EntityCountQuery, EntityTypeFilter, KeyFilter, EntityKey, - BooleanFilterPredicate, FilterPredicateValueBoolean, + EntityCountQuery, + EntityTypeFilter, + KeyFilter, + EntityKey, + BooleanFilterPredicate, + FilterPredicateValueBoolean, ) with ThingsboardClient(MOCK_URL, api_key=API_KEY) as client: type_filter = EntityTypeFilter(entity_type="DEVICE") - total = client.count_entities_by_query( - EntityCountQuery(entity_filter=type_filter) - ) + total = client.count_entities_by_query(EntityCountQuery(entity_filter=type_filter)) assert total == 3 active_filter = KeyFilter( diff --git a/tests/test_python_client_docs_pe.py b/tests/test_python_client_docs_pe.py index bb149a16..26ff1a42 100644 --- a/tests/test_python_client_docs_pe.py +++ b/tests/test_python_client_docs_pe.py @@ -158,9 +158,9 @@ def test_rate_limit_handling_builder_options(mock_http): client = ThingsboardClient( MOCK_URL, api_key=API_KEY, - max_retries=3, # default 3 - initial_retry_delay_ms=1_000, # default 1 s - max_retry_delay_ms=30_000, # default 30 s + max_retries=3, # default 3 + initial_retry_delay_ms=1_000, # default 1 s + max_retry_delay_ms=30_000, # default 30 s ) assert callable(client.get_tenant_devices) @@ -331,16 +331,18 @@ def _route_with_dynamic_count(): # === doc snippet === from tb_pe_client import ThingsboardClient from tb_pe_client.models import ( - EntityCountQuery, EntityTypeFilter, KeyFilter, EntityKey, - BooleanFilterPredicate, FilterPredicateValueBoolean, + EntityCountQuery, + EntityTypeFilter, + KeyFilter, + EntityKey, + BooleanFilterPredicate, + FilterPredicateValueBoolean, ) with ThingsboardClient(MOCK_URL, api_key=API_KEY) as client: type_filter = EntityTypeFilter(entity_type="DEVICE") - total = client.count_entities_by_query( - EntityCountQuery(entity_filter=type_filter) - ) + total = client.count_entities_by_query(EntityCountQuery(entity_filter=type_filter)) assert total == 3 active_filter = KeyFilter( @@ -366,9 +368,7 @@ def _route_with_dynamic_count(): def test_create_and_populate_group(mock_http): real_device_id = DEVICE_UUID - mock_http.add( - "POST", r"/api/entityGroup", json_body=_entity_group_payload("Acme Devices") - ) + mock_http.add("POST", r"/api/entityGroup", json_body=_entity_group_payload("Acme Devices")) mock_http.add( "POST", rf"/api/entityGroup/{DEVICE_GROUP_UUID}/addEntities",